1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00
ZoKrates/zokrates_cli/examples/functions/lt_comparison.zok
2022-06-28 19:23:45 +02:00

22 lines
397 B
Text

def lt(field a,field b) -> bool {
return a < b;
}
def cutoff() -> field {
return 31337;
}
def getThing(u32 index) -> field {
field[6] a = [13, 23, 43, 53, 73, 83];
return a[index];
}
def cubeThing(field thing) -> field {
return thing**3;
}
def main(u32 index) -> bool {
field mut thing = getThing(index);
thing = cubeThing(thing);
return lt(cutoff(), thing);
}