shithub: mc

ref: 4be51eb1ffb5b87d36a9910012bbc513d8a0bd2d
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
}