def nth

emerging-ezhttp@0.21.0.0 · src/unescape.bend:62

import emerging-ezhttp@0.21.0.0/src/unescape.bend as Unescape
import Base

62# the code point at a place in a list, 65533 past its end
63def nth(xs: List<&2, U32>, i: Nat) -> U32:
64  match xs i:
65    case [] _:
66      65533
67    case x <> t 0n:
68      x
69    case x <> t 1n+p:
70      nth(t, p)

Uses (3)

Used by (1)