ref: 6235cb639285f9ff5a7fc483a1950a8cd42f9aa9
dir: /lib/std/slput.myr/
use "types.use" use "alloc.use" use "die.use" pkg std = generic slput : (sl : @a[:], idx : size, elt : @a -> @a[:]) ;; generic slput = {sl, idx, elt var i var len len = sl.len sl = slgrow(sl, sl.len + 1) for i = len - 1; i >= idx; i-- sl[i + 1] = sl[i] ;; sl[idx] = elt -> sl }