You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/documentation/control-flow.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -130,6 +130,7 @@ have the form `:modifier argument`. The following modifiers are supported:
130
130
*`:while` breaks the loop if the expression is falsy.
131
131
*`:let` defines additional bindings.
132
132
*`:when` only evaluates the loop body if the condition is true.
133
+
*`:reduce [accumulator initial-value]` Instead of returning a list, it reduces the values into `accumulator`. Initially `accumulator` is bound to `initial-value`.
133
134
134
135
```phel
135
136
(for [x :range [0 3]] x) # Evaluates to [0 1 2]
@@ -143,6 +144,8 @@ have the form `:modifier argument`. The following modifiers are supported:
0 commit comments