def nth0

bend-collections-laws-math@1.0.0.0 · proofs/lib/words32.bend:50

import bend-collections-laws-math@1.0.0.0/proofs/lib/words32.bend as Words32
import Base

50def nth0(tb: List<&2, U32>, +i: Nat) -> U32:
51  match tb i:
52    case Nil{} _:
53      0
54    case Con{x, t} 0n:
55      x
56    case Con{x, t} 1n+p:
57      nth0(t, p)

Uses (3)

Used by (3)