shithub: mc

ref: aedfbe887c3e0e2a2b8f5f9fa546c1f792e0483c
dir: /libstd/slpush.myr/

View raw version
use "types.use"
use "alloc.use"
use "fmt.use"

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

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