3 ms·
because a -> f -> g -> h is better than h(g(f(a))). It is the functional way of doing the OOP fluent builder pattern: a.f().g().h() It is the pipe operator (F#
by aloisdg 6y ago
because a -> f -> g -> h is better than h(g(f(a))). It is the functional way of doing the OOP fluent builder pattern: a.f().g().h()
It is the pipe operator (F#, Elixir, Haxe, etc.). There is a proposal to add it to js too.
- mlajtos 6y agoOn top of that, it is a symmetrical to fat arrow functions, which is a shorthand for lambda: fun: x => x * 2 res: 4 -> fun
- vorticalbox 6y agoI have always used ramdajs for this. const R = require('ramda'); R.pipe(a,f,g,h)
- bijinpanicker 6y agoI added it on python. Check it in https://github.com/LangTrans/Py_Trans https://github.com/LangTrans/Py_Trans