fun add(x: Int): Int do return x + 1
var f = &add
var xs = [1,2,3,4,5]
var actual = xs.iterator.map(f).to_a
assert actual == [2,3,4,5,6]
# Applies a function to every elements
#
# ~~~~nitish
# fun add(x: Int): Int do return x + 1
#
# var f = &add
# var xs = [1,2,3,4,5]
# var actual = xs.iterator.map(f).to_a
# assert actual == [2,3,4,5,6]
# ~~~~
fun map(f: Fun1[E,Object]): MapIter[E,Object]
do
return new MapIter[E,Object](self, f)
end
lib/functional/iter_extras.nit:51,9--64,11