An iterator that maps each item with f.

Introduced properties

init defaultinit(my_iter: Iterator[OLD], f: Fun1[A, B])

functional :: MapIter :: defaultinit

fun f: Fun1[A, B]

functional :: MapIter :: f

protected fun f=(f: Fun1[A, B])

functional :: MapIter :: f=

Redefined properties

redef type SELF: MapIter[A, B]

functional $ MapIter :: SELF

Type of this instance, automatically specialized in every class
redef fun item: B

functional $ MapIter :: item

The current item.

All properties

type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
init defaultinit(my_iter: Iterator[OLD], f: Fun1[A, B])

functional :: MapIter :: defaultinit

fun f: Fun1[A, B]

functional :: MapIter :: f

protected fun f=(f: Fun1[A, B])

functional :: MapIter :: f=

abstract fun item: E

core :: Iterator :: item

The current item.
package_diagram functional::MapIter MapIter

Ancestors

interface Iterator[E: nullable Object]

core :: Iterator

Iterators generate a series of elements, one at a time.
interface Object

core :: Object

The root of the class hierarchy.

Class definitions

functional $ MapIter
# An iterator that maps each item with `f`.
class MapIter[A,B]
        super FunIter[A,B]
        var f: Fun1[A, B]

        redef fun item
        do
                return f.call(my_iter.item)
        end

end
lib/functional/iter_extras.nit:256,1--266,3