1
0
Fork 0
mirror of synced 2025-09-23 04:08:33 +00:00
ZoKrates/zokrates_cli/examples/bool_or.zok
2022-04-06 20:23:58 +02:00

7 lines
No EOL
202 B
Text

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