Two more small pure-Roc List builtins from #9596:
insert : List(a), U64, a -> Try(List(a), [OutOfBounds, ..]) — insert an element at an index, Try-returningintersperse : List(a), a -> List(a) — put a separator between elementsBoth pure Roc over existing primitives, no new low-level ops. Planning insert as one small PR and intersperse as another — and for intersperse, shout if you'd rather see it as an Iter helper than a List one.
insert is up as #10359. Holding intersperse for now — shout if you'd rather it be an Iter helper, otherwise I'll open it too.
Last updated: Aug 12 2026 at 12:35 UTC