def first2
import lawful-bytes@0.1.1.0/defs.bend as Defsimport Base
78# The same for either of two values (same assumptions).
79def first2(xs: List<&2, U32>, +from: Nat, +to: Nat, +c1: U32, +c2: U32) -> Nat:
80 Nat.add(from, run_len2(slice(xs, from, Nat.sub(to, from)), c1, c2))