Skip to content

Commit

Permalink
added function output types
Browse files Browse the repository at this point in the history
  • Loading branch information
KeneePatel committed May 27, 2024
1 parent fa24186 commit 2ec3cf7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/builtin.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// calculates bitwise 'AND' of given two inputs x and y
function BITWISE_AND(x: bigint, y: bigint) {
function BITWISE_AND(x: bigint, y: bigint): bigint {
return x & y;
}

// calculates bitwise 'OR' of given two inputs x and y
function BITWISE_OR(x: bigint, y: bigint) {
function BITWISE_OR(x: bigint, y: bigint): bigint {
return x | y;
}

// calculates bitwise 'XOR' of given two inputs x and y
function BITWISE_XOR(x: bigint, y: bigint) {
function BITWISE_XOR(x: bigint, y: bigint): bigint {
return x ^ y;
}

// calculates bitwise 'AND', 'XOR' and 'OR' of given two inputs x and y
function BITWISE_OPERATIONS(x: bigint, y: bigint) {
function BITWISE_OPERATIONS(x: bigint, y: bigint): [bigint, bigint, bigint] {
return [BITWISE_AND(x, y), BITWISE_XOR(x, y), BITWISE_OR(x, y)];
}

0 comments on commit 2ec3cf7

Please sign in to comment.