1
0
Fork 0
mirror of synced 2025-09-24 04:40:05 +00:00
ZoKrates/zokrates_cli/examples/book/assembly/bool_to_field.zok
2022-11-22 20:32:49 +01:00

8 lines
No EOL
235 B
Text

from "EMBED" import bool_to_field;
def main(bool x) -> field {
// `x` is constrained by the compiler automatically so we can safely
// treat it as `field` with no extra cost
field out = bool_to_field(x);
return out;
}