3 ms·
Whoa, this is amazing! I find this example much, much easier to read: > For example, where Haskellers would write: f = average . filter (> 0) . map normal
by spankalee 6y ago
Whoa, this is amazing! I find this example much, much easier to read:
> For example, where Haskellers would write:
f = average . filter (> 0) . map normalize
> in hinc the idiomatic translation would be:
let f(lst) = lst.map(normalize)
.filter((x) => x > 0)
.average
These seems like very sane, pragmatic choices considering the massive segment of programmers used to C/Java/JavaScript derived syntax.
Now, if the currently top comment about category theory could be addressed, I think we'd have something.