Perl 6 Perl 6 #17

Reduction operators (pairwise infix)

Any infix operator can be surrounded by brackets to turn it into a "reducing" list operator:

Perl 6:

[+] 1, 2, 3                # 1 + 2 + 3 == 6
continued...
Copyright © 2008 Patrick Michaud