lastBy<K> method

Coral<Map<K, E>> lastBy<K>(
  1. K key(
    1. E element
    )
)

Groups elements by key reactively, keeping only the last element for each key.

Implementation

Coral<Map<K, E>> lastBy<K>(K Function(E element) key) =>
    coral.map((source) => Map<K, E>.unmodifiable(source.lastBy<K>(key)));