File: Mathlib/Data/MLList/Split.lean

full_name: MLList.getUpToFirstM
code: /--
Extract the prefix of a lazy list consisting of elements up to and including
the first element satisfying a monadic predicate.
Return (in the monad) the prefix as a `List`, along with the remaining elements as a `MLList`.
-/
partial def getUpToFirstM (L : MLList m α) (p : α → m (ULift Bool)) : m (List α × MLList m α) 
goal: m (List α × MLList m α)

full_name: MLList.getUpToFirst
code: /--
Extract the prefix of a lazy list consisting of elements up to and including
the first element satisfying a predicate.
Return (in the monad) the prefix as a `List`, along with the remaining elements as a `MLList`.
-/
def getUpToFirst (L : MLList m α) (p : α → Bool) : m (List α × MLList m α) 
goal: m (List α × MLList m α)

full_name: MLList.splitWhileM
code: /--
Extract a maximal prefix of a lazy list consisting of elements
satisfying a monadic predicate.
Return (in the monad) the prefix as a `List`, along with the remaining elements as a `MLList`.

(Note that the first element *not* satisfying the predicate will be generated,
and pushed back on to the remaining lazy list.)
-/
partial def splitWhileM (L : MLList m α) (p : α → m (ULift Bool)) :
    m (List α × MLList m α) 
goal: m (List α × MLList m α)

full_name: MLList.splitWhile
code: /--
Extract a maximal prefix of a lazy list consisting of elements
satisfying a predicate.
Return (in the monad) the prefix as a `List`, along with the remaining elements as a `MLList`.

(Note that the first element *not* satisfying the predicate will be generated,
and pushed back on to the remaining lazy list.)
-/
def splitWhile (L : MLList m α) (p : α → Bool) : m (List α × MLList m α) 
goal: m (List α × MLList m α)

full_name: MLList.groupByM
code: /--
Splits a lazy list into contiguous sublists of elements with the same value under
a monadic function.
Return a lazy lists of pairs, consisting of a value under that function,
and a maximal list of elements having that value.
-/
partial def groupByM [DecidableEq β] (L : MLList m α) (f : α → m β) : MLList m (β × List α) 
goal: MLList m (β × List α)

full_name: MLList.groupBy
code: /--
Splits a lazy list into contiguous sublists of elements with the same value under a function.
Return a lazy lists of pairs, consisting of a value under that function,
and a maximal list of elements having that value.
-/
def groupBy [DecidableEq β] (L : MLList m α) (f : α → β) : MLList m (β × List α) 
goal: MLList m (β × List α)

full_name: MLList.splitAtBecomesTrueM.aux
code: /--
Split a lazy list into contiguous sublists,
starting a new sublist each time a monadic predicate changes from `false` to `true`.
-/
partial def splitAtBecomesTrueM (L : MLList m α) (p : α → m (ULift Bool)) : MLList m (List α) 
goal: MLList m (List α)

full_name: MLList.splitAtBecomesTrueM
code: /--
Split a lazy list into contiguous sublists,
starting a new sublist each time a monadic predicate changes from `false` to `true`.
-/
partial def splitAtBecomesTrueM (L : MLList m α) (p : α → m (ULift Bool)) : MLList m (List α) 
goal: MLList m (List α)

full_name: MLList.splitAtBecomesTrue
code: /--
Split a lazy list into contiguous sublists,
starting a new sublist each time a predicate changes from `false` to `true`.
-/
def splitAtBecomesTrue (L : MLList m α) (p : α → Bool) : MLList m (List α) 
goal: MLList m (List α)