[iterate-devel] Fwd: if-first-iteration, a little better vers ion as an arch patch
Attila Lendvai
attila.lendvai at gmail.com
Wed Feb 8 22:47:59 UTC 2006
> Add-binding was previously used only via make-binding-internal. Your patch bypasses all the checks that the make-* functions do, and the functionality they provide. Is that clearer?
yep, please find the new version of the patch attached.
> >Maybe a make-shared-binding is what's missing?
> Indeed something seems missing, e.g. "create only if not existing already, but I don't know the name of the possibly existing binding".
for now i simply used make-accum-var-binding as you suggested in a few
mails before.
some doc fragmants:
FIRST-TIME-P evaluates to true for the first time it is evaluated,
otherwise to nil. It works like that even inside conditionals, only
the first evaluation counts.
Example:
(iter (for el in '("a" 1 2 3 "b"))
(when (numberp el)
(unless (first-time-p)
(princ ", "))
(princ el)))
prints "1, 2, 3"
FIRST-ITERATION-P evaluates to true inside the loop body in the first
loop cycle, otherwise to nil.
hope it helps,
- attila
(alias 101 on irc &no 'its not lisp code :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: first-iteration-p.patch
Type: application/octet-stream
Size: 4125 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/iterate-devel/attachments/20060208/b7b77a9a/attachment.obj>
More information about the iterate-devel
mailing list