1
0
Fork 0
mirror of synced 2025-09-24 04:40:05 +00:00
ZoKrates/zokrates_cli/examples/book/side_effects.zok
2022-06-28 19:23:45 +02:00

11 lines
175 B
Text

def incr(field mut a) -> field {
a = a + 1;
return a;
}
def main() {
field x = 1;
field res = incr(x);
assert(x == 1); // x has not changed
return;
}