We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e44e8d commit 0e638caCopy full SHA for 0e638ca
examples/accumulate.janet
@@ -0,0 +1,8 @@
1
+(reduce + 0 [1 2 3 4]) #-> 10
2
+(accumulate + 0 [1 2 3 4]) # -> @[1 3 6 10]
3
+
4
+(reduce + 0 []) # -> 0
5
+(accumulate + 0 []) # -> @[]
6
7
+(reduce string "" ["J" "a" "n" "e" "t"]) # -> "Janet"
8
+(accumulate string "" ["J" "a" "n" "e" "t"]) # -> @["J" "Ja" "Jan" "Jane" "Janet"]
0 commit comments