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

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon Jan 31 10:24:53 EST 2011

Interesting point. With types, this issue just goes away. 

(No matter what, I argue that Lazy should be totally compatible 
in contracts/types/argument order with Racket. Nothing else 
makes sense.) 



On Jan 30, 2011, at 3:28 PM, Eli Barzilay wrote:

> 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!
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/dev




Posted on the dev mailing list.