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

8 lines
200 B
Text

// example using ternary with &&
def main(field a, field b) -> field {
field y = a + 2 == 3 && a * 2 == 2 ? 1 : 0;
field z = y == 1 && 1 - y == 0 ? y : 1;
assert(b == 1);
return a;
}