I have a fold that wants to be a zip:
circuit foo(input: Bytes<32>, t: Uint<32>,): Boolean {
return fold((acc: Boolean, byte: Uint<8>, i: Uint<8>): Boolean =>
...,
true,
input,
[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31];
}
Running compact-format over this causes it to be... ugly.
circuit foo(input: Bytes<32>, t: Uint<32>,): Boolean {
return fold((acc: Boolean, byte: Uint<8>, i: Uint<8>): Boolean =>
...,
true,
input,
[0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31];
}
Moving it to another function makes it less annoying
circuit zero_to_31(): Vector<32, Uint<5>> {
return [0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31];
}
Could something like this be an exception, or maybe get some kind of directive like #[no_format] or something like that? I really like having format-on-save.
I have a
foldthat wants to be azip:Running
compact-formatover this causes it to be... ugly.Moving it to another function makes it less annoying
Could something like this be an exception, or maybe get some kind of directive like
#[no_format]or something like that? I really like having format-on-save.