pipe = (...fns) => (x) => fns.reduce((v, f) => f(v), x);
pipe( getName, uppercase, get6Characters, reverse )(
{ name: 'Buckethead' }); // 'TEKCUB'
has same same effect as nested function calls, with many brackets
name: 'Buckethead' })))); // 'TEKCUB'
Array.prototype.reduce() - JavaScript | MDN
Pipe Function in JavaScript. Hello, in this blog post I am going to… | by Neerthigan S | Medium
Unix: "A pipe is a form of redirection that is used to send the output of one program to another program for further processing."
(F#) Pipe Operator (|>) for JavaScript
No comments:
Post a Comment