def lc.at

bend-osdev-legacy-ciphers@0.1.0.0 · legacy_ciphers.bend:61

import bend-osdev-legacy-ciphers@0.1.0.0/legacy_ciphers.bend as LegacyCiphers
import Base

61# element n of a list of words (0 past the end)
62def lc.at(xs: List<&2, U32>, n: Nat) -> U32:
63  match xs:
64    case Nil{}:
65      0
66    case Con{h, t}:
67      match n:
68        case 0n:
69          h
70        case 1n+p:
71          lc.at(t, p)

Uses (3)

Used by (21)