Instance Methodgrdb 7.3.0GRDB

removeDuplicates(by:)

Notifies only values that don’t match the previously observed value, as evaluated by a provided closure.

RemoveDuplicates.swift:8
func removeDuplicates(by predicate: sending @escaping (Reducer.Value, Reducer.Value) -> Bool) -> ValueObservation<ValueReducers.RemoveDuplicates<Reducer>>

Parameters

predicate

A closure to evaluate whether two values are equivalent, for purposes of filtering. Return true from this closure to indicate that the second element is a duplicate of the first.