summaryrefslogtreecommitdiff
path: root/libstd/slfill.myr
blob: d90e8f5d8672f11aba80c935e3b260371a9dd7e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
pkg std =
	generic slfill	: (sl : @a[:], v : @a	-> @a[:])
;;

generic slfill = {sl, v
	var i

	for i = 0; i < sl.len; i++
		sl[i] = v
	;;
	-> sl
}