shithub: mc

ref: 54da79816fab4a03e8f6022d6c9764d9099abd60
dir: /libstd/slappend.myr/

View raw version
use "alloc.use"

pkg std =
	generic slappend	: (sl : @a[:], v : @a	-> @a[:])
;;

generic slappend = {sl, v
	sl = slgrow(sl, sl.len + 1)
	sl[sl.len - 1] = v
	-> sl
}