chain -> andThen?
Tim Peierls
tim at peierls.net
Fri Jun 28 09:23:54 PDT 2013
On Fri, Jun 28, 2013 at 11:09 AM, Brian Goetz <brian.goetz at oracle.com>wrote:
> We eventually settled on "andThen" as the composition method for
> function-like things. This was chosen because it made the order explicit;
> "do my thing, and then this other thing." This method shows up on
> Comparator, XxxFunction, XxxOperator.
>
> There's a similar method on Consumer, called "chain", which means "let me
> have the argument, then pass it to some other Consumer". I think it makes
> sense to rename this to "andThen" as well.
>
Agreed, much better to have the order explicit in the name. It does mean
referring to function-like things as if they were actions, but that seems
like a totally acceptable blurring of the lines.
--tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/lambda-libs-spec-experts/attachments/20130628/b40ca27e/attachment.html
More information about the lambda-libs-spec-experts
mailing list