We already have some toXxx() methods (toList, toSet, toCollection, toMap, ...), so toBoth seems to me as a natural extension of that naming principle:

For toXxx methods, the Xxx is terminal, and tied to the result type.  toArray converts to an array; toList to a List; toCollection to a Collection.  This does not convert the elements to a Both, and there's no Both type.  So, I think the analogy falls apart.


Reply via email to