1
0
Fork 0
mirror of synced 2025-09-24 04:40:05 +00:00
ZoKrates/zokrates_cli/examples/functions/lt_comparison.zok
2020-11-09 18:04:28 +00:00

17 lines
364 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 thing = getThing(index)
thing = cubeThing(thing)
return lt(cutoff(), thing)