File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ Authors: Johannes Hölzl
6
6
import Mathlib.Init.Control.Combinators
7
7
import Mathlib.Tactic.CasesM
8
8
import Mathlib.Tactic.Attr.Core
9
+ import Std.Data.List.Basic
9
10
10
11
#align_import control.basic from "leanprover-community/mathlib" @"48fb5b5280e7c81672afc9524185ae994553ebf4"
11
12
@@ -77,14 +78,6 @@ variable {m : Type u → Type v} [Monad m] [LawfulMonad m]
77
78
78
79
open List
79
80
80
- /-- A generalization of `List.partition` which partitions the list according to a monadic
81
- predicate. `List.partition` corresponds to the case where `f = Id`. -/
82
- def List.partitionM {f : Type → Type } [Monad f] {α : Type } (p : α → f Bool) :
83
- List α → f (List α × List α)
84
- | [] => pure ([], [])
85
- | x :: xs => condM (p x)
86
- (Prod.map (cons x) id <$> List.partitionM p xs)
87
- (Prod.map id (cons x) <$> List.partitionM p xs)
88
81
#align list.mpartition List.partitionM
89
82
90
83
theorem map_bind (x : m α) {g : α → m β} {f : β → γ} :
Original file line number Diff line number Diff line change 36
36
{"git" :
37
37
{"url" : " https://github.com/leanprover/std4" ,
38
38
"subDir?" : null ,
39
- "rev" : " e8c27f7d90ee71470558efd1bc197fe55068c748 " ,
39
+ "rev" : " 2a10db96d0ea1c00d0b30d2bbcea7e7b4584ffba " ,
40
40
"opts" : {},
41
41
"name" : " std" ,
42
42
"inputRev?" : " main" ,
You can’t perform that action at this time.
0 commit comments