def list.fits
import bend-kit-journal@0.3.1.0/journal.bend as Journalimport Base
164def list.fits(xs: List<&2, U32>, +at: U32, +n: U32) -> List<&2, U32> & Bool:
165 +ys = xs
166 (ys, Nat.is_le(Nat.add(U32.to_nat(at), U32.to_nat(n)), List.length(&2, U32, ys)))