On Thu, 14 Nov 2002, Luke Palmer wrote:

> > nest:
> >     Nest is the power loop thingy documented in Raphael Finkel's top notch 
> > book "Advanced Programming Language Design", near the end of the "Control 
> > Structures" chapter -- this book is in PDF format:
> > http://www.nondot.org/sabre/Mirrored/AdvProgLangDesign/
>
> The only thing it doesn't cover is C<nest>, which, in practical
> situations, isn't all that useful anyway.  It's cleaner just to nest
> manually. 

In 2002, I said: 
        As the Finkel book points out, that only works if you know ahead of 
time how many layers deep you're going to be nesting.  Personally, I don't 
expect to need nest more than once or twice in my life, but it'd be useful for 
the times it's needed.  

Now I add:
        I knew there was a situation where these are useful, and I've found 
it, and it'll probably be more frequent in Perl6 than Perl5: recursing through 
multidimensional arrays where you don't know how many dimensions there are.  
For example, nest would be great for implementing some of the APL operators.  
Just fors the record:
Perl            APL
Operators       Functions
Hyper-operators Operators

http://www.info.univ-angers.fr/pub/gh/wAides/sax6_userdoc.pdf
        Look under Language Guide/Operators.  

        :)


---------------------------------------------------------------------
| Name: Tim Nelson                 | Because the Creator is,        |
| E-mail: [EMAIL PROTECTED] | I am                           |
---------------------------------------------------------------------

----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+ s:- a- C++>++++$ U++ P++ L++ E- W+++ N+ w>--- V- Y+>++ 
PGP->++ R !tv b++ DI++++ D+ G e++>++++ h! y-
-----END GEEK CODE BLOCK-----

Reply via email to