Seems I got it totally wrong :-(

I'll re-read the lazy page ...

Sorry,

-- 
Laurent

2009/2/18 David Nolen <dnolen.li...@gmail.com>

> If I've been following things correct:
> rest _used_ to force the seq, it does no longer.
> next forces the seq
>
> In my own mind i'm thinking next to mean (return the seq with the next
> value computed), rest now means just give me the uncomputed remaining values
> of the seq.
>
> On Wed, Feb 18, 2009 at 12:00 PM, Laurent PETIT 
> <laurent.pe...@gmail.com>wrote:
>
>>
>>
>> 2009/2/18 Mark Volkmann <r.mark.volkm...@gmail.com>
>>
>>
>>> On Wed, Feb 18, 2009 at 10:27 AM, Rich Hickey <richhic...@gmail.com>
>>> wrote:
>>> >
>>> > 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?
>>>
>>> Of those I prefer &rest because its meaning is more explicit.
>>
>>
>> Maybe I miss the point totally, but didn't the recent change give the
>> function 'next the meaning of not forcing the seq ?
>>
>> So &next instead of &rest ? ... and maybe either &rest or &next , and not
>> just & anymore ?
>>
>>
>>>
>>>
>>> --
>>> R. Mark Volkmann
>>> Object Computing, Inc.
>>>
>>>
>>>
>>
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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