Applies a function to every elements

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]

Property definitions

functional :: iter_extras $ Iterator :: map
        # 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