shithub: mc

ref: 55f9f36fd0a2dd5378f1a71a82aa9eb1b7f69562
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
}