[racket-dev] [plt] Push #22081: master branch updated

From: Eli Barzilay (eli at barzilay.org)
Date: Sun Jan 30 15:28:41 EST 2011

The lazy `take' has another reason to return '() instead of an error:
avoiding any force of the input "list" when you want 0 elements.  This
is similar to why `first', `second', `third', etc are not like the
ones in racket, and probably never will be.


On Thursday, Stephen Chang wrote:
> I meant in lazy-take, which is what was changed in this push (args are
> flipped). If it behaves that way in Racket, then I guess lazy should
> be consistent.
> 
> 
> On Thu, Jan 27, 2011 at 4:42 PM, Robby Findler
> <robby at eecs.northwestern.edu> wrote:
> > Do you mean (take "nonlist" 0)? That's '() in regular Racket, I think
> > to accommodate improper lists.
> >
> > C:\Users\Administrator\git\exp\plt>Racket.exe
> > Welcome to Racket v5.0.99.7.
> >> (take "nonlist" 0)
> > '()
> >
> > Robby
> >
> > On Thu, Jan 27, 2011 at 3:32 PM, Stephen Chang <stchang at ccs.neu.edu> wrote:
> >> What should be the result of (take 0 "nonlist")
> >>
> >> In the spirit of this bug report, I think it should be an error
> >> http://bugs.racket-lang.org/query/?cmd=view&pr=11458
> >>
> >> But right now it evaluates to the empty list.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the dev mailing list.