lastBy<K> method

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

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

  • key: Function extracting the grouping key from each element.

Implementation

Bloom<Map<K, E>> lastBy<K>(K Function(E element) key) =>
    computed((via) => Map<K, E>.unmodifiable(via(bloom).lastBy<K>(key)));