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
Evaluates the expressions in order and returns the value of the last expression. If no expression is given, `nil` is returned.
165
+
166
+
```phel
167
+
(do 1 2 3 4) # Evaluates to 4
168
+
(do (print 1) (print 2) (print 3)) # Print 1, 2, and 3
169
+
```
170
+
158
171
# Dofor
159
172
160
173
```
@@ -164,7 +177,7 @@ have the form `:modifier argument`. The following modifiers are supported:
164
177
165
178
Iterating over collections for side-effects is also possible with `dofor` which has similar behavior to `for` otherwise but returns `nil` as `foreach` does.
166
179
167
-
##Exceptions
180
+
# Exceptions
168
181
169
182
```phel
170
183
(throw expr)
@@ -196,16 +209,3 @@ All expressions are evaluated and if no exception is thrown the value of the las
196
209
(catch \Exception e "error")
197
210
(finally (print "test"))) # Evaluates to "error" and prints "test"
198
211
```
199
-
200
-
## Statements (do)
201
-
202
-
```phel
203
-
(do expr*)
204
-
```
205
-
206
-
Evaluates the expressions in order and returns the value of the last expression. If no expression is given, `nil` is returned.
207
-
208
-
```phel
209
-
(do 1 2 3 4) # Evaluates to 4
210
-
(do (print 1) (print 2) (print 3)) # Print 1, 2, and 3
0 commit comments