Synopsis:
scan(n,f) -- applies the function f to each integer in the range 0 .. n-1 discarding the results.
This is equivalent to scan(0 .. n-1, f).
i1 : scan(3,print) 0 1 2
i2 : v = {a,b,c} o2 = {a, b, c} o2 : List
i3 : scan(#v, i -> print(i,v#i)) (0, a) (1, b) (2, c)