@[inline]
def
ByteSlice.foldlM
{m : Type u_1 → Type u_2}
{β : Type u_1}
[Monad m]
(s : ByteSlice)
(f : β → UInt8 → m β)
(init : β)
:
m β
Folds a monadic function over a ByteSubarray from left to right.
Equations
- s.foldlM f init = ByteArray.foldlM f init s.toByteArray s.start s.stop
Instances For
@[implicit_reducible]
Equations
- ByteSlice.instForInUInt8OfMonad_batteries = { forIn := fun {β : Type ?u.2} => ByteSlice.forIn }
@[implicit_reducible]
Equations
- ByteSlice.instCoeByteArray_batteries = { coe := fun (as : ByteArray) => as.toByteSlice }