groupSetsBy<K> method

Coral<Map<K, Set<E>>> groupSetsBy<K>(
  1. K keyOf(
    1. E element
    )
)

Groups elements into sets by keyOf reactively.

Implementation

Coral<Map<K, Set<E>>> groupSetsBy<K>(K Function(E element) keyOf) =>
    coral.map((source) => Map<K, Set<E>>.unmodifiable(
          source
              .groupSetsBy<K>(keyOf)
              .map((k, v) => MapEntry<K, Set<E>>(k, Set<E>.unmodifiable(v))),
        ));