Clarified readme regarding named update.
This commit is contained in:
parent
dd86fc8a0b
commit
b3efccb4aa
1 changed files with 13 additions and 1 deletions
14
README.md
14
README.md
|
@ -70,7 +70,19 @@ You can of course still have a larger control of your loops:
|
|||
;; => (-1 4 -9 16 -25 36 -49 64 -81 100)
|
||||
```
|
||||
|
||||
Named updates have a bug, sadly.
|
||||
Named updates have a bug, sadly, but works if there is only _one_ instance of the iteration macro. This doesn't curretnly work, but will in a little time:
|
||||
|
||||
```
|
||||
;; Shamelessly stolen from Taylor Campbell's foof-loop documentation
|
||||
(loop continue ((:for element (in-list list))
|
||||
(:acc satisfied (in '()))
|
||||
(:acc unsatisfied (in '())))
|
||||
=> (values (reverse satisfied)
|
||||
(reverse unsatisfied))
|
||||
(if (predicate element)
|
||||
(continue (=> satisfied (cons element satisfied)))
|
||||
(continue (=> unsatisfied (cons element unsatisfied))))))
|
||||
```
|
||||
|
||||
|
||||
## Todo
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue