take and drop #
Further results on List.take
and List.drop
, which rely on stronger automation in Nat
,
are given in Init.Data.List.TakeDrop
.
@[reducible, inline, deprecated List.drop_of_length_le (since := "2024-07-07")]
Equations
Instances For
@[reducible, inline, deprecated List.take_of_length_le (since := "2024-07-07")]
Equations
Instances For
@[reducible, inline, deprecated List.drop_eq_nil_iff (since := "2024-09-10")]
Instances For
takeWhile and dropWhile #
theorem
List.head?_takeWhile
{α : Type u_1}
(p : α → Bool)
(l : List α)
:
(takeWhile p l).head? = Option.filter p l.head?