Documentation

Regex.Data.Array.Basic

def Array.head? {α : Type u_1} (a : Array α) :
Option (α × Array α)

get head element and array without head element

Equations
  • a.head? = match a.toList with | [] => none | head :: tail => some (head, { toList := tail })
Instances For
    def Array.pop? {α : Type u_1} (a : Array α) :
    Option (α × Array α)

    get last element and array without last element

    Equations
    • a.pop? = if h : 0 < a.toList.length then some (a.toList.get a.toList.length - 1, , a.pop) else none
    Instances For
      def Array.last? {α : Type u_1} (a : Array α) :

      get last element of array

      Equations
      • a.last? = if h : 0 < a.toList.length then some (a.toList.get a.toList.length - 1, ) else none
      Instances For
        def Array.unique {α : Type u_1} [BEq α] (intervals : Array α) :

        unique array of sorted array

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For