-
Notifications
You must be signed in to change notification settings - Fork 1
ExcludeSeq
laforge49 edited this page Jul 27, 2011
·
5 revisions
ExcludeSeq wraps 2 other sequences and creates a sequence containing all the key/value pairs of the first sequence, excluding those keys present in the second sequence.
Test code.
val range2 = new Range(new Mailbox, null, 1, 10)
val seq = new FilterSeq(range2, (x: Int) => x % 2 == 0)
val range3 = new Range(new Mailbox, null, 1, 200)
val exclude = new FilterSeq(range2, (x: Int) => x % 3 == 0)
val excludeSeq = new ExcludeSeq(seq, exclude)
Future(excludeSeq, Loop((key: Int, value: Int) => println(key+" "+value)))
Output.
2 2 4 4 8 8