4 ms·
If you're not matching on variable numbers of arguments, you can just have 1 function sig and a case statement. The thing I dislike most about erlang, besides
by lg 17y ago
If you're not matching on variable numbers of arguments, you can just have 1 function sig and a case statement.
The thing I dislike most about erlang, besides the lack of a good macro system, is that the repl is full of annoying special cases, so you have to actually stick your code in a file with a proper module name and compile it in order to test stuff :(
- davidw 17y agoPattern matching with functions is more 'idiomatic' Erlang, though, than case statements. At least that's what I've seen.