shithub: mc

ref: 330b2e6a59402d3a290629f409d77c2692973f3c
dir: /lib/std/sldup.myr/

View raw version
use "alloc"
use "die"
use "slcp"

pkg std =
	generic sldup : (sl : @a[:] -> @a[:])
;;

generic sldup = {sl
	var ret

	ret = slalloc(sl.len)
	slcp(ret, sl)
	-> ret
}