> let's say all I care for is that the input parameter can be iterated over.
If I'm understanding you correctly, you want to iterate over your "list"? If so:
iterator myIterator(a: openArray[int]): int =
for x in a:
yield 10*x
let l = @[1, 2, 3]
for n in myIterator(l):
echo 5*n
Run
prints:
50
100
150
Run
