News for hackers. Stuff that matters.
Re:Pipable functions in C++14 by Guthur on Saturday September 06, 2014 @11:16PM (#8280239)
Just because you can use some ambiguous syntax construct does not make it good or even clever.

This sort of thing can be done a lot clear with functional constructs like compose and curry.

Common Lisp example (easily done with any language that supports higher order functions): (funcall (compose 'add-one 'add-one) 1)

And you can roll that a number of ways; adding in a curry of the identity of 1 if you just want a nullary function.

(funcall (compose 'add-one 'add-one (curry 'identity 1))

And if you are interested in typing less, maybe you are a dreadful typist...try Haskell.

There are no comments on this comment yet.