shithub: mc

ref: 655dad8f92c315c5c205b3c021b19ce2916e4c9b
dir: /lib/iter/test/enum.myr/

View raw version
use std
use iter

const main = {
	var n

	n = 0
	for (x, i) : iter.byenum([1,3,5,7,9][:])
		std.assert(x == n, "invalid enum idx {}", x)
		std.assert(i == n*2 + 1, "invalid enum val {}", i)
		n++
	;;
}