def lc.at

bend-osdev-cipher-core@0.1.0.0 · cipher_core.bend:58

import bend-osdev-cipher-core@0.1.0.0/cipher_core.bend as CipherCore
import Base

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

Uses (3)

Used by (5)