Understand lambda function - kdaisho/Blog GitHub Wiki
function double
in Haskell
double x = (\x -> (\x -> (\x -> x*2) x) x) x
double 2
-- 4
is equivalent to this in JavaScript
function double(x) {
return ((x) => ((x) => ((x) => x * 2)(x))(x))(x)
}
double(2)
// 4