Skip to content

Commit 5fbbf2f

Browse files
committed
loop example with let
1 parent b99465f commit 5fbbf2f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/chap-6/g-c-dictionary/loop_macro.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,14 @@ Note the usage of the word `with` below.
8080
19
8181
NIL
8282
```
83+
84+
This is similar to the alternative of wrapping the `loop` form in a `let` form.
85+
86+
```lisp
87+
(let ((i 0))
88+
(loop for x below 50
89+
when (and (< i 10)
90+
(not (evenp x)))
91+
do (print x)
92+
and do (setf i (1+ i))))
93+
```

0 commit comments

Comments
 (0)