[alexandria-devel] if-let*
Marco Baringer
mb at bese.it
Sat Nov 24 16:59:43 UTC 2012
(i think i've already sent this, but it hasn't shown up on the list,
sorry if you get it twice)
hi,
i recently needed (or just decided that i wanted it) a version of
if-let with sequential binding. The bindings form is as with if-let,
however to ensure that only the 'true' bindings are seen in the else
form (and i'm not convinced this is worth it) the else form is
repeated multiple times (once per binding) in the macro's expansion.
the docstring should explain how it works (and if not i'll fix the
docstring).
and, since it made sense to me at the time, when-let and when-let* are
implemented in terms of if-let and if-let* (instead of repeating the
binding expansion and and code).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Adde-if-let-macro.patch
Type: text/x-patch
Size: 5370 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/alexandria-devel/attachments/20121124/5225fdae/attachment.bin>
-------------- next part --------------
--
-marco
More information about the alexandria-devel
mailing list