This module provides the typeclass ToIterator, which is implemented by types that can be
converted into iterators.
@[inline]
def
Std.ToIterator.iterM
{γ : Type u_1}
{m : Type u_2 → Type u_3}
{α β : Type u_2}
(x : γ)
[ToIterator γ m α β]
:
IterM m β
Converts x into a monadic iterator.
Equations
Instances For
@[inline]
Converts x into a pure iterator.
Equations
Instances For
@[inline]
def
Std.ToIterator.ofM
{γ : Type u_1}
{m : Type w → Type u_2}
{β : Type w}
(α : Type w)
(iterM : γ → IterM m β)
:
ToIterator γ m α β
Creates a monadic ToIterator instance.
Equations
- Std.ToIterator.ofM α iterM = { iterMInternal := fun (x : γ) => iterM x }
Instances For
@[inline]
def
Std.ToIterator.of
{γ : Type u_1}
{β : Type w}
(α : Type w)
(iter : γ → Iter β)
:
ToIterator γ Id α β
Creates a pure ToIterator instance.
Equations
- Std.ToIterator.of α iter = { iterMInternal := fun (x : γ) => (iter x).toIterM }
Instances For
Replaces ToIterator.iterM with its definition.
Replaces ToIterator.iter with its definition.