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.
2 parents e81b8d3 + 4db4b2f commit 4e04088Copy full SHA for 4e04088
content/documentation/control-flow.md
@@ -146,6 +146,8 @@ have the form `:modifier argument`. The following modifiers are supported:
146
(for [[k v] :pairs [1 2 3]] [k v]) # Evaluates to [[0 1] [1 2] [2 3]]
147
(for [[k v] :pairs {:a 1 :b 2 :c 3} :reduce [m {}]]
148
(put m k (inc v))) # Evaluates to {:a 2 :b 3 :c 4}
149
+(for [[k v] :pairs {:a 1 :b 2 :c 3} :reduce [m {}] :let [x (inc v)]]
150
+ (put m k x)) # Evaluates to {:a 2 :b 3 :c 4}
151
152
(for [x :in [2 2 2 3 3 4 5 6 6] :while (even? x)] x) # Evaluates to [2 2 2]
153
(for [x :in [2 2 2 3 3 4 5 6 6] :when (even? x)] x) # Evaluates to [2 2 2 4 6 6]
0 commit comments