On Feb 18, 11:04 am, Chouser <chou...@gmail.com> wrote:
> On Wed, Feb 18, 2009 at 12:35 AM, Rob <rob.nikan...@gmail.com> wrote:
>
> > I'm wondering if I found a bug.  I have the latest source from svn
> > (r1291).
>
> > user=> (bean 1)
> > java.lang.IllegalArgumentException: Wrong number of args passed to:
> > core$bean--5161$fn--5179$thisfn
>
> You sure did.  The conversion to lazy-seq code appears to introduce a
> paren typo and an incorrect nil pun.  Patch attached.
>

Patch applied, svn 1293 - thanks!

> Rich, I think it'd be pretty useful to have as you mentioned in IRC a
> variant of & destructuring that provided an unforced lazy-seq.  It
> seems pretty common to want, in the body of a lazy-seq, a destructured
> 'first' but an unforced 'rest'.  This is already the third or fourth
> time I've wanted to be able to do something like:
>
>   (fn thisfn [plseq]
>     (lazy-seq
>       (when-let [[pkey &rest etc] plseq]
>         (cons (new clojure.lang.MapEntry pkey (v pkey))
>               (thisfn etc)))))
>

Yes, sure. It just comes down to the name:

&rest
&&

others?

Rich
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to