heptagon/test/good/foldi.ept
Léonard Gérard 36061f4518 fixed tests to the new iterator syntax.
Changed (( and )) to (< and >) since it's very common to write )) !
2011-03-21 22:24:37 +01:00

11 lines
209 B
Text

const n:int=42
fun f(a:bool; i:int; acc_in : bool) returns (acc_out : bool)
let
acc_out = if i = 0 then false else (a & acc_in);
tel
fun g(a: bool^n) returns (o:bool)
let
o = foldi<<n>> f (a, true);
tel