From: "Mauricio Fernández" Date: 2003-04-12T07:41:24+09:00 Subject: Re: splat question On Sat, Apr 12, 2003 at 05:39:05AM +0900, Chris Pine wrote: > This sounds like lazy evaluation, the kind of stuff you can find around > implemented with continuations. > ---------------------------- > > Well, it might sound that way, but it really isn't. :) > > Lazy evaluation is much more involved and deep; I was only talking about a > difference in implementation. > [...] > > Well, now that I think about it, perhaps it wouldn't be of much use without > lazy evaluation. I could still get the array_of_ones[500] with the above > implementation, but I wouldn't be able to write a function to pairwise add > infinite arrays, for example, and get an array_of_twos. > > Would continuations really allow this sort of thing? I don't see how you > would use continuations to give you lazy evaluation or infinite arrays. Generators provide some kind of restricted lazy evaluation (an arguably, infinite arrays). http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/rough/lib/generator.rb http://w3.one.net/~jweirich/talks/same_fringe/ -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com Turn right here. No! NO! The OTHER right!