Re:What you can write in Perl 6 today
by halo on Friday April 24, 2009 @11:26AM
(#577615)
The syntax seems perfectly reasonable, or even natural, to me. Perhaps you're over-thinking the specifics, or are too used to other functional programming languages where 'reduction' has a slightly different, more specific, meaning (i.e. fold).
Note that this means, unlike the normal reduce, that it follows the operator's default precedence rules, and presumably the less-than operator works similarly to Python's in that it allows comparison chaining (i.e. 1 < 2 < 3 works as you'd expect) to make the result using reduce seem natural.
[ Parent
| on HN ]
There are no comments on this comment yet.