DEV Community

Discussion on: Lenses: The What and How

kurisutofu profile image

raaa ... now that you say it, I see the

return function(x)

while when I posted my comment I read it as below in my head ...

function compose(g, f) {
    function(x) { // returns a function, that expects one parameter
        return g(f(x));

Sorry about that!
And also, thanks for the detailed explanation! I will go back to your article!