summaryrefslogtreecommitdiff
path: root/lib/std/sldup.myr
blob: a3b7310b1255b101c1b2ae83ebc4b7c1c292ac6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
}