Lazy deduplication of lazy lists #
def
MLList.dedup
{m : Type → Type}
{β : Type}
[Monad m]
[BEq β]
[Hashable β]
(L : MLList m β)
:
MLList m β
Lazily deduplicate a lazy list, using a stored HashMap
.
Equations
- MLList.dedup L = MLList.dedupBy L fun (b : β) => pure b