def in.nth
import bend-osdev-acpi@0.1.1.0/aml_interp.bend as AmlInterpimport Base
import bend-osdev-acpi@0.1.1.0/error.bend as E
import bend-osdev-acpi@0.1.1.0/aml_value.bend as V
446def in.nth(xs: List<&2, V.AmlValue>, i: Nat) -> Result<&2, &2, E.AcpiError, V.AmlValue>:
447 match xs i:
448 case Nil{} _:
449 Fail{E.AcpiAmlRange{}}
450 case Con{h, t} 0n:
451 Done{h}
452 case Con{h, t} 1n+k:
453 in.nth(t, k)