Skip to content

Commit cbed484

Browse files
committed
fix rebase
1 parent f0fb70c commit cbed484

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Init/Data/List/Basic.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,17 +1686,17 @@ where
16861686
`O(|l|)`. `splitBy R l` splits `l` into chains of elements
16871687
such that adjacent elements are related by `R`.
16881688
1689-
* `groupBy (·==·) [1, 1, 2, 2, 2, 3, 2] = [[1, 1], [2, 2, 2], [3], [2]]`
1690-
* `groupBy (·<·) [1, 2, 5, 4, 5, 1, 4] = [[1, 2, 5], [4, 5], [1, 4]]`
1689+
* `splitBy (·==·) [1, 1, 2, 2, 2, 3, 2] = [[1, 1], [2, 2, 2], [3], [2]]`
1690+
* `splitBy (·<·) [1, 2, 5, 4, 5, 1, 4] = [[1, 2, 5], [4, 5], [1, 4]]`
16911691
-/
1692-
@[specialize] def groupBy (R : α → α → Bool) : List α → List (List α)
1692+
@[specialize] def splitBy (R : α → α → Bool) : List α → List (List α)
16931693
| [] => []
16941694
| a::as => loop as a [] []
16951695
where
16961696
/--
1697-
The arguments of `groupBy.loop l ag g gs` represent the following:
1697+
The arguments of `splitBy.loop l ag g gs` represent the following:
16981698
1699-
- `l : List α` are the elements which we still need to group.
1699+
- `l : List α` are the elements which we still need to split.
17001700
- `ag : α` is the previous element for which a comparison was performed.
17011701
- `g : List α` is the group currently being assembled, in **reverse order**.
17021702
- `gs : List (List α)` is all of the groups that have been completed, in **reverse order**.

0 commit comments

Comments
 (0)