4 ms·
FWIW, several language communities call this "the Thrush combinator"[0]. Armed with that term, searching the web for background/info/theory on this topic will
by AdieuToLogic 8y ago
FWIW, several language communities call this "the Thrush combinator"[0]. Armed with that term, searching the web for background/info/theory on this topic will be easier.
0 - https://debasishg.blogspot.com/2009/09/thrush-combinator-in-scala.html https://debasishg.blogspot.com/2009/09/thrush-combinator-in-...
- yanis_t 8y agoThanks! Sounds a bit too scientific to my ear but good to know
- AdieuToLogic 8y agoIt is what it is, and what it is in JavaScript is this: Object.prototype.pipeTo = function (functor) { return functor (this); }; function inc (input) { return input + 1; } // this will write out "2" to the console log new Number (1).pipeTo (inc).pipeTo (console.log); HTH