1
1
mirror of https://github.com/tweag/nickel.git synced 2024-11-10 10:46:49 +03:00

Fix numeric benchmarks

This commit is contained in:
Yann Hamdaoui 2021-03-25 17:30:55 +01:00
parent 66a1b134ae
commit ea21879879
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@
run = fun n => run = fun n =>
let numbers = lists.generate builtins.id n in let numbers = lists.generate builtins.id n in
lists.foldl (fun acc x => acc + x) 0 numbers lists.foldl (fun acc x => acc + x) 0 numbers
} },
product = { product = {
run = fun n => run = fun n =>

View File

@ -1,6 +1,6 @@
{ {
let map2 = fun f l1 l2 => map2 = fun f l1 l2 =>
if l == [] || l2 == [] then if l1 == [] || l2 == [] then
[] []
else else
[f (lists.head l1) (lists.head l2)] [f (lists.head l1) (lists.head l2)]