MostlyAdequate / mostly-adequate-guide

Mostly adequate guide to FP (in javascript)
Other
23.43k stars 1.87k forks source link

get confused for functor of IO #604

Open lemondreamtobe opened 3 years ago

lemondreamtobe commented 3 years ago

Document Delivery ` // iowindow :: IO Window var io_window = new IO(function(){ return window; });

io_window.map(function(win){ return win.innerWidth }); // IO(1430) ` i think the right Notes is IO(() => 1430). easy to understand because compose return a function not a value.