MostlyAdequate / mostly-adequate-guide

Mostly adequate guide to FP (in javascript)
Other
23.3k stars 1.86k 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.