| I've built a pattern-matching macro for function definitions in Arc, currently pushed on http://git.nex-3.com/arc-wiki.git in lib/defpat.arc . Among other things, it supports fixed-arity functions, docstrings, symbol-matching (you just have to put symbols in a 'symbol form, otherwise they are treated as variables), and list destructuring. Like most Arc conditional structures, it uses a <pattern> <clause> <pattern> <clause> <clause> style. This is just a test of how to do stuff in Arc ^^. Whether you like or dislike pattern-matching in functions is up to you. |