17
Often I want to do something like the following:
sapply(sapply(x, unique),sum)
Which I can also write as:
sapply(x, function(y) sum(unique(y)))
But I don't like to write out the lambda each time. So is there some kind of function that lets me write?
sapply(x, concat(sum,unique))
And concat just concatenates the two functions, thus creates a new one, which executes one after the other.