RACUnarySequence Class Reference
Inherits from | RACSequence : RACStream : NSObject |
Declared in | RACUnarySequence.h RACUnarySequence.m |
Properties
head
The first object in the sequence, or nil if the sequence is empty.
@property (nonatomic, strong, readwrite) id head
Discussion
Subclasses must provide an implementation of this method.
Declared In
RACSequence.h
Instance Methods
bind:
Lazily binds a block to the values in the receiver.
- (instancetype)bind:(RACStreamBindBlock ( ^ ) ( void ))block
Discussion
This should only be used if you need to terminate the bind early, or close over some state. flattenMap: is more appropriate for all other cases.
block - A block returning a RACStreamBindBlock. This block will be invoked each time the bound stream is re-evaluated. This block must not be nil or return nil.
Returns a new stream which represents the combined result of all lazy
applications of block
.
Declared In
RACStream.h
tail
All but the first object in the sequence, or nil if the sequence is empty.
- (RACSequence *)tail
Discussion
Subclasses must provide an implementation of this method.
Declared In
RACSequence.h