At 11:24 PM +0000 11/13/06, Smylers wrote:
Darren Duncan writes:
 > 1. I'm not sure if it is possible yet, but like Haskell et al ..., it
 should be possible to write a Perl 6 routine or program in a pure
 functional notation or paradigm, such that the entire routine body is
 a single expression, but that has named reusable sub-expressions.

I realize it isn't pure functional, but in Perl a C<do> block permits
arbitrary code to be treated as a single expression.  Or to put it
another way round, you can use temporary variables inside the expression
that don't 'leak out' of it.

Hmm. I may have to think some more, but it appears that a C<do> block may be sufficient for what I wanted, which was to embed reusable named parts inside of an arbitrary larger expression. Thank you. -- Darren Duncan

Reply via email to