Pierre-Yves: My bad; I've updated the gist so that this syntax works.

Toivo: Aside from performance the functions generated by @fn should behave 
exactly the same as regular anonymous ones. Although they are technically 
named (something like ##521), the name is untypeable so they can't be 
altered or overloaded (at least not by accident). Redefining a function 
with e.g. f = @fn x -> x will simply replace it as usual, and f(x) = x will 
throw an error.

I didn't know about PatternDispatch.jl, it looks really cool.

Reply via email to