3 ms·
I find this style changes the way I think about and write code transformations. It's also in shell pipelines, R's magrittr, and Clojure's thread macros, and can
by fantispug 2y ago
I find this style changes the way I think about and write code transformations.
It's also in shell pipelines, R's magrittr, and Clojure's thread macros, and can be emulated in some OO languages with methods that return the transformed object itself.
- elcritch 2y agoIt also works with universal function call syntax line in Nim. Though aesthetically I prefer `|>` for multi-line expressions.
- fjkdlsjflkds 2y ago> R's magrittr These days, base R already includes a native pipe operator (and it is literally `|>`, rather than magrittr's `%>%`).
- evandrofisico 2y agoyeah, in lua some libs are used just like this, using the : syntatic sugar, something line value = table:function1():function2():function3()