diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-09-10 17:07:56 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-09-11 18:00:15 +0200 |
commit | 5672d44892c4010cdfbdc46f5fb29259fa51e076 (patch) | |
tree | 3afc2ee6dac2d17746014f7f73a704d793336bc1 /doc/ref/guile | |
parent | Add documentation and tests for xdg basedir. (diff) | |
download | calp-5672d44892c4010cdfbdc46f5fb29259fa51e076.tar.gz calp-5672d44892c4010cdfbdc46f5fb29259fa51e076.tar.xz |
Add `break` and `continue` support in `for`.
Diffstat (limited to 'doc/ref/guile')
-rw-r--r-- | doc/ref/guile/util.texi | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/doc/ref/guile/util.texi b/doc/ref/guile/util.texi index 7536a9bc..95af9038 100644 --- a/doc/ref/guile/util.texi +++ b/doc/ref/guile/util.texi @@ -34,8 +34,8 @@ our extra specialized @var{when}}, but binds the return of @defmacx for (key ...) in collection body ... Syntactic sugar over @code{map}. @example -for x in collection - body ... +(for x in collection + body ...) @end example expands into @example @@ -44,6 +44,17 @@ expands into If keys are a list, an match-lambda is used instead. @xref{Pattern Matching,,,guile} + +@defun break args ... +Abandon the entire loop. Returing what was given to @code{break}. +@end defun + +@defun continue [arg] +Abandon the current iteration of the loop. If an argument is given, +it's used as the result in the resulting list, otherwise @code{#f} is +used. +@end defun + @end defmac |