- toStream : collection → stream
def
Stream.forIn
{ρ : Type u_1}
{α : Type u_2}
{m : Type u_3 → Type u_4}
{β : Type u_3}
[inst : Stream ρ α]
[inst : Monad m]
(s : ρ)
(b : β)
(f : α → β → m (ForInStep β))
:
m β
Equations
- Stream.forIn s b f = let _ := { default := pure b }; Stream.forIn.visit f s b
partial def
Stream.forIn.visit
{ρ : Type u_1}
{α : Type u_2}
{m : Type u_3 → Type u_4}
{β : Type u_3}
[inst : Stream ρ α]
[inst : Monad m]
(f : α → β → m (ForInStep β))
(s : ρ)
(b : β)
:
m β
Equations
- instToStreamArraySubarray = { toStream := fun a => Array.toSubarray a 0 (Array.size a) }
Equations
- instToStreamStringSubstring = { toStream := fun s => String.toSubstring s }
Equations
- instToStreamRange = { toStream := fun r => r }
Equations
- One or more equations did not get rendered due to their size.
Equations
- instStreamRangeNat = { next? := fun r => if r.start < r.stop then some (r.start, { start := r.start + r.step, stop := r.stop, step := r.step }) else none }
Equations
- One or more equations did not get rendered due to their size.