Remove the insane "fold" operation, replace with saner "reduce".

This commit is contained in:
Stephen Dolan committed 2013-05-16 15:07:53 +01:00
1 parent 8fbee891b3
commit bc42812715
7 files changed
+37 -38

No files matched your search

+1 -1
View File
@@ -379,7 +379,7 @@ def fac: if . == 1 then 1 else . * (. - 1 | fac) end; [.[] | fac]
# []
# 1001
fold 0 as $s (.[] | $s + .)
reduce .[] as $x (0; . + $x)
[1,2,4]
7