@[inline]
def ForInStep.bind {m : Type u_1 → Type u_2} {α : Type u_1} [Monad m] (a : ForInStep α) (f : α → m (ForInStep α)) :
m (ForInStep α)
This is similar to a monadic bind operator, except that the two type parameters have to be
the same, which prevents putting a monad instance on ForInStepT m α := m (ForInStep α).
Instances For
@[reducible, inline]
abbrev ForInStep.bindM {m : Type u_1 → Type u_2} {α : Type u_1} [Monad m] (a : m (ForInStep α)) (f : α → m (ForInStep α)) :
m (ForInStep α)
This is similar to a monadic bind operator, except that the two type parameters have to be
the same, which prevents putting a monad instance on ForInStepT m α := m (ForInStep α).
Instances For
@[inline]
Get the value out of a ForInStep.
This is usually done at the end of a forIn loop to scope the early exit to the loop body.