-
Notifications
You must be signed in to change notification settings - Fork 705
Open
Labels
Description
We could handle ++ on Grouped which could merge two Grouped[K, V] together. The trick is to handle cases where they got to be value type V from different starting (K, _) pipes. One trick would be to map the left to Left() and right to Right() before any value mapping. Then lift the value mappings into the Left or Right spaces, then you have Left[L] => Left[V] and Right[R] => Right[V] then you just do fold(identity)(identity) to unwrap both sides onto V, and you're still Grouped.
Alternatively, we could implement .either on Grouped[K, L] , Grouped[K, R] and then ++ can be implemented in terms of that for the case where L == R.
Reactions are currently unavailable