Compare commits

...

1 Commits

Author SHA1 Message Date
Kim Morrison
10bdf8a9d8 chore: upstream Array.reduceOption 2024-10-18 11:21:17 +11:00

View File

@@ -817,9 +817,15 @@ def split (as : Array α) (p : α → Bool) : Array α × Array α :=
/-! ## Auxiliary functions used in metaprogramming.
We do not intend to provide verification theorems for these functions.
We do not currently intend to provide verification theorems for these functions.
-/
/- ### reduceOption -/
/-- Drop `none`s from a Array, and replace each remaining `some a` with `a`. -/
@[inline] def reduceOption (as : Array (Option α)) : Array α :=
as.filterMap id
/-! ### eraseReps -/
/--