3 ms·
As a lisp programmer who never wrote in Haskell the snippet you quoted is crystal clear to me, while with explicit loops I always have to double check, because
by jlg23 7y ago
As a lisp programmer who never wrote in Haskell the snippet you quoted is crystal clear to me, while with explicit loops I always have to double check, because I am pattern matching the code "ah, a map or reduce was meant" but I still have to double check assignments and the abort condition (off by one, incrementing the wrong index etc).
- ThinkBeat 7y agoI write Lisp but I have no idea what /x means in the example above for instance.
- dzsekijo 7y agoThe "\" (which is "\" rather than "/", as already pointed out) is just an ascii approximation of λ (just like "u" is used to approximate μ).
- kian 7y agoIt means a 1-argument lambda, where that one argument is named x
- Jare 7y agoThat's a syntax knowledge problem, not a readability problem. \x -> introduces a lambda function with a parameter x, like (x) => in javascript etc.