def lc.nth

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

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

228# the element i of bs (False past the end)
229def lc.nth(bs: List<&2, Bool>, i: Nat) -> Bool:
230  match bs:
231    case Nil{}:
232      False{}
233    case Con{h, t}:
234      match i:
235        case 0n:
236          h
237        case 1n+p:
238          lc.nth(t, p)

Uses (3)

Used by (1)