1
0
Fork 0
mirror of synced 2025-09-24 04:40:05 +00:00
ZoKrates/zokrates_cli/examples/bool_or.zok
2020-01-06 14:07:40 -05:00

7 lines
215 B
Text

// example using if-then-else-fi with ||
def main(field a, field b) -> (field):
field y = if a + 2 == 4 || b * 2 == 2 then 1 else 0 fi
field z = if y == 1 || y == 0 then y else 1 fi
z == 1
return z