I came away with a similar reaction, but there is no need to map separately first: https://news.ycombinator.com/item?id=13136056
Sometimes I do wish Erlang had something like F#'s active patterns because it'd make this sort of thing trivial to add to standard pattern expressions. Maybe someday I'll figure out how to add it myself.
Re:Erlangers, Use Labels
by chriswarbo on Thursday December 08, 2016 @11:51AM
(#13131689)
Ah, sorry you're right; I mustn't have played with Erlang enough to fade out the punctuation (unlike Lisp, where https://github.com/tarsius/paren-face can do it for me ;) ).
All lambda in Erlang is case: