MapSeq - laforge49/Asynchronous-Functional-Programming GitHub Wiki
MapSeq[K, V, V1] is a subclass of Sequence[K, V1] and is used to transform the values of another sequence. The constructor takes two parameters, (1) another sequence actor, seq: Sequence[K, V], and (2) a function, f: V => V1. MapSeq takes its mailbox from its seq actor, so its interactions with seq are usually synchronous.
Test code.
val range = new Range(1, 4)
val map = new MapSeq(range, (v: Int) => v * 2)
Future(map, Loop((key: Int, value: Int) => println(key+" "+value)))
Output.
1 2
2 4
3 6