shithub: mc

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