Re:Pun: A small library to enable pattern matching in JavaSc...
by unignorant on Sunday August 03, 2014 @11:46AM
(#8128210)
Nice, that's a clever use of decorators. A bit annoying that you need repeated "defs", though.
Here's another approach based on Macropy (basically, macros for Python): https://github.com/lihaoyi/macropy#pattern-matching.
https://gist.github.com/andybak/45e3155420d18420a34a