On Wed, Jan 26, 2011 at 2:41 PM, John Clements <[email protected]> wrote: > Correct me if I'm wrong, but this appears to be a different issue. The > question here is not laziness, but the length of the resulting list. Here's > another example: > > #lang lazy > > (define zeros (cons 0 zeros)) > > (define lazy-list-of-length-one (take 1 zeros)) > > (define should-be-null (rest lazy-list-of-length-one)) > > => > > Welcome to DrRacket, version 5.0.99.6--2011-01-20(d675c7b/g) [3m]. > Language: lazy [custom]; memory limit: 256 MB. >> (! should-be-null) > '(0 . #<promise:...llects/lazy/lazy.rkt:588:41>)
Yes, I believe you've found a bug. When lazy-take was updated to fix the bug pointed out by Casey, one of the legitimate combination of arguments (n = 0, lst = non-null) was accidentally dropped. I just tested an older version and your code works. I'm fixing it now. Welcome to DrRacket, version 5.0.0.6 [3m]. Language: Lazy Racket [custom]. > should-be-null () _________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

