def nth
import gralha-text-scan@0.1.0.1/scan.bend as Scanimport 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)