def nth

gralha-text-scan@0.1.0.1 · scan.bend:232

import gralha-text-scan@0.1.0.1/scan.bend as Scan
import Base

232def nth(xs: List<&2, F32>, i: Nat, fallback: F32) -> F32:
233  match xs i:
234    case Nil{} _: fallback
235    case Con{h, t} 0n: h
236    case Con{h, t} 1n+p: nth(t, p, fallback)

Uses (3)

Used by (18)