Perl6 Is the World’s Worst ML (With Addendum by Damian Conway)

Perl6 Is the World’s Worst ML (With Addendum by Damian Conway)

Since Perl6 uses the smartmatch operator to match up type signatures, that means that we can also match on arguments by value…. 10 minutes later, and I’ve created this abomination:

… equivalent to the much more readable Haskell version…

The Perl6 code uses a few fun tricks that I’d like to point out. The declaration is entirely optional, just as the type signature in the Haskell version is entirely optional.

Source: aearnus.github.io