3 ms·
It's following the semantics of wider use of `<<`` in groovy which denotes forwarding contents of one object into another, eg: adding to a list list << x
by zmmmmm 8y ago
It's following the semantics of wider use of `<<`` in groovy which denotes forwarding contents of one object into another, eg: adding to a list
list << x
or writing to a stream:
new File('test.txt') << 'hello world'
So if you read it as "forward the result of g into f" then it makes a little more sense.
But I agree, it's still not very intuitive and for readability I would normally just write:
h = { f(g(it)) }
Which I think is far clearer. But that's partly an argument against functional programming style itself which would ordinarily see function composition as more idiomatic.