Skip to content

Commit b710672

Browse files
committed
implement intersection semigroup
1 parent 606f1e7 commit b710672

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

core/src/main/java/fj/Semigroup.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,4 +629,8 @@ public static <A> Semigroup<Set<A>> setSemigroup() {
629629
return semigroupDef(Set::union);
630630
}
631631

632+
public static <A> Semigroup<Set<A>> setIntersectionSemigroup() {
633+
return semigroupDef(Set::intersect);
634+
}
635+
632636
}

0 commit comments

Comments
 (0)