class Stream(T)
- Stream(T)
- Reference
- Object
Included Modules
- BaseStream
Defined in:
sys/stream.crInstance Method Summary
-
#all(between a : Stream(M), and b : Stream(K), now = false) forall M, K
Pumps objects from this stream to the returned stream when a receives an object, and stops pumping when b receives a value.
-
#each(&func : T -> )
Calls func before pumping an object unchanged.
-
#except(&func : T -> Bool)
Pumps only those objects for which func returns false.
-
#except(pattern)
Pumps only those objects that do not match against pattern (using
===
). -
#map(&func : T -> U) forall U
Pumps an object transformed by func.
-
#pump(sender, object : T)
Pumps object to listening streams.
-
#pump(sender, object) : NoReturn
Pumps object to listening streams.
-
#pump(object : T)
Pumps object to listening streams.
-
#sub(listener : BaseStream) : BaseStream
Subscribes listener to events in this stream.
-
#uniq(&func : T -> U) forall U
Pumps only if the result of func over the pumped object is not equal (
==
) to its previous result. -
#uniq
Pumps only if the pumped object is not equal to the previous pumped object.
-
#unsub(listener : BaseStream)
Un-subscribes listener from events in this stream.
-
#when(&func : T -> Bool)
Pumps only those objects for which func returns true.
-
#when(type : U.class) forall U
Pumps only those objects that are of the given type.
-
#when(pattern)
Pumps only those objects that match against pattern (using
===
).
Instance Method Detail
Pumps objects from this stream to the returned stream when a receives an object, and stops pumping when b receives a value.
Pumps only if the result of func over the pumped object
is not equal (==
) to its previous result.
The first pumped object is always pumped.
Pumps only those objects that are of the given type.