3 ms·
If your goal is to reduce redundancy than I think a "lambda-case" syntax might be a better fit. As a bonus it also lets you use this feature on anonymous functi
by ufo 12y ago
If your goal is to reduce redundancy than I think a "lambda-case" syntax might be a better fit. As a bonus it also lets you use this feature on anonymous functions!
https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/syntax-extns.html#lambda-case https://downloads.haskell.org/~ghc/latest/docs/html/users_gu...
http://stackoverflow.com/questions/1604270/what-is-the-different-between-fun-and-function-keywords http://stackoverflow.com/questions/1604270/what-is-the-diffe...
- breuleux 12y agoThere already is a "lambda-case" syntax. "fact(match) = ..." is sugar for "fact = match -> ...". If one works, then so does the other. Personally I much prefer the way I do it, because it is more powerful, works in more places, and requires no new syntactic forms.