FR
PréludeChargé par défaut — aucun import nécessaire.

Subscript access and indexed update

Synopsis
panic : String -> a

Abort the program with a message — an unrecoverable error (unlike the catchable Throw effect). Backs c[i] / index when the index is out of range.

index : List a -> Nat -> a

Direct subscript xs[i] — panics if i is out of range.

set : List a -> Nat -> a -> List a

set xs i v — a new list with position i set to v (unchanged if i is out of range). The notation xs { [i] := v } is equivalent (kept — decision Q3 2026-07-02 — but set is the form to teach and document).