Re: Adding Complexity

2005-04-28 Thread Luke Palmer
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

Re: Adding Complexity

2005-04-28 Thread Ingo Blechschmidt
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 >

Re: Adding Complexity

2005-04-28 Thread Luke Palmer
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

Re: Adding Complexity

2005-04-28 Thread Ingo Blechschmidt
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

Re: Adding Complexity

2005-04-28 Thread Ingo Blechschmidt
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

Re: Adding Complexity

2005-04-28 Thread Mark Reed
> 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

Re: Adding Complexity

2005-04-28 Thread Thomas Sandlaß
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

Adding Complexity

2005-04-26 Thread Jonathan Lang
As an exercise, I've been looking into what could be done in terms of creating a complex numbers package that takes advantage of perl 6 technology. A couple of thoughts that I ran across: When you take the square root of a number, you actually get one of two possible answers (for instance, sqrt(