![]() |
|
Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^2: A mini-language for sequences (part 1)by tmoertel (Chaplain) |
on Nov 06, 2004 at 16:03 UTC ( #405772=note: print w/replies, xml ) | Need Help?? |
One thing I forgot to point out in my previous response is that the
example you cite, in particular, is crippled by the small size of our
vocabulary (to date). Had we the space to discuss concatmap,
the following implementation would have been available:
This implementation is much clearer (assuming you know concatmap). Concatmap combines concat and map; it maps a sequence to a sequence of sequences, whose values are then concatenated to yield the output sequence. For example:
Cheers, Tom Moertel : Blog / Talks / CPAN / LectroTest / PXSL / Coffee / Movie Rating Decoder
In Section
Meditations
|
|