Documentation

Init.Data.List.BasicAux

def List.get! {α : Type u_1} [inst : Inhabited α] :
List αNatα
Equations
def List.get? {α : Type u_1} :
List αNatOption α
Equations
def List.getD {α : Type u_1} (as : List α) (idx : Nat) (a₀ : α) :
α
Equations
def List.head! {α : Type u_1} [inst : Inhabited α] :
List αα
Equations
def List.head? {α : Type u_1} :
List αOption α
Equations
def List.headD {α : Type u_1} :
List ααα
Equations
  • List.headD x x = match x, x with | [], a₀ => a₀ | a :: x, x_1 => a
def List.head {α : Type u_1} (as : List α) :
as []α
Equations
def List.tail! {α : Type u_1} :
List αList α
Equations
def List.tail? {α : Type u_1} :
List αOption (List α)
Equations
def List.tailD {α : Type u_1} :
List αList αList α
Equations
  • List.tailD x x = match x, x with | [], as₀ => as₀ | a :: as, x => as
def List.getLast {α : Type u_1} (as : List α) :
as []α
Equations
def List.getLast! {α : Type u_1} [inst : Inhabited α] :
List αα
Equations
def List.getLast? {α : Type u_1} :
List αOption α
Equations
def List.getLastD {α : Type u_1} :
List ααα
Equations
def List.rotateLeft {α : Type u_1} (xs : List α) (n : optParam Nat 1) :
List α
Equations
def List.rotateRight {α : Type u_1} (xs : List α) (n : optParam Nat 1) :
List α
Equations