egison-4.1.2: benchmark/collection-bench-cons.egi
def countEvens n l :=
match l as list integer with
| ?isEven :: $tl -> countEvens (n + 1) tl
| _ :: $tl -> countEvens n tl
| [] -> n
def testNumbers :=
let from n := if n <= 0 then [0] else n :: from (n - 1)
in from 10000
countEvens 0 testNumbers