Ingo Blechschmidt writes:
> Hi,
>
> Luke Palmer wrote:
> >> ...which makes me wonder if it'd be good|cool|whatever to not only
> >> have lazy lists, but also lazy *values*...: :))
> >
> > Then every expression that referenced lazy values would be lazy in
> > terms
> > of them. And once you want
Hi,
Luke Palmer wrote:
>> ...which makes me wonder if it'd be good|cool|whatever to not only
>> have lazy lists, but also lazy *values*...: :))
>
> Then every expression that referenced lazy values would be lazy in
> terms
> of them. And once you want to print X digits of the lazy answer, you
>
Ingo Blechschmidt writes:
> Hi,
>
> > Essentially lazy lists are suspended closures. But I dought that
> > arithmetic between them is defined such that pi + pi would leazily
> > calculate 6.28...
>
> ...which makes me wonder if it'd be good|cool|whatever to not only have
> lazy lists, but also la
Ingo Blechschmidt wrote:
> And:
> my @ones = gather { take 1 while 1 };
> my $ones = join "", @ones; # does not burn out!
> say length $ones; # Inf
s/length/chars/ of course.
--Ingo
--
Linux, the choice of a GNU | God said: tar xvjf universe.tar.gz - and
generation on a dual AMD
Hi,
> Essentially lazy lists are suspended closures. But I dought that
> arithmetic between them is defined such that pi + pi would leazily
> calculate 6.28...
...which makes me wonder if it'd be good|cool|whatever to not only have
lazy lists, but also lazy *values*...: :))
my $pi = calc_pi_laz
> Jonathan Lang wrote:
>> > When you take the square root of a number, you actually get one of two
>> > possible answers (for instance, sqrt(1) actually gives either a 1 or a
>> > -1).
Not quite. It¹s true that there are two possible square roots of any given
number, but sqrt(1) is defined as th
Jonathan Lang wrote:
When you take the square root of a number, you actually get one of two
possible answers (for instance, sqrt(1) actually gives either a 1 or a
-1).
sqrt() is a function that maps its input domain into its output range.
As such multiple return values are at least not part of the