vavr
vavr copied to clipboard
something like innerJoin (kind of similar to zipWith) but with Key
I am wondering if we can merge two collections to tuples if and only if the elements have something in common:
// (tuple(1, 1), tuple(2, 2))
Seq.of(1, 2, 4).innerJoin(Seq.of(1, 2, 3), (a, b) -> a == b);
the jool library has something like this.
I was searching vavr for such a function but i did not find it yet