Fold operation (code/docs/test)

This commit is contained in:
Stephen Dolan committed 2012-12-28 15:05:34 +00:00
1 parent 9302b16247
commit 417899f9a0
6 files changed
+61 -1

No files matched your search

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