mirror of
https://github.com/fluencelabs/aqua-lib
synced 2024-12-04 15:20:23 +00:00
This reverts commit a062fcd444
.
This commit is contained in:
parent
3b31da9a41
commit
e3c06bf8fc
25
binary.aqua
Normal file
25
binary.aqua
Normal file
@ -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!
|
Loading…
Reference in New Issue
Block a user