whereSome method

Map<K, Some<V>> whereSome()

Creates a new map containing only the entries where the value is a Some. The values in the new map are instances of Some<V>.

Implementation

Map<K, Some<V>> whereSome() => Map.fromEntries(
      entries
          .where((e) => e.value.isSome())
          .map((e) => MapEntry(e.key, e.value.some().unwrap())),
    );