diff --git a/binary.aqua b/binary.aqua new file mode 100644 index 0000000..701a764 --- /dev/null +++ b/binary.aqua @@ -0,0 +1,25 @@ +-- TODO: add aqua tests + +func and(l: bool, r: bool) -> bool: + res: ?bool + if l: + res <<- r + else: + res <<- false + <- res! + +func or(l: bool, r: bool) -> bool: + res: ?bool + if l: + res <<- true + else: + res <<- r + <- res! + +func not(u: bool) -> bool: + res: ?bool + if u: + res <<- false + else: + res <<- true + <- res!