shithub: mc

ref: baf8c15face883eaf2d06a875dee6bbf73134913
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
}