Inherits from NSObject
Declared in RACStream.h

Overview

When subclassing RACStream, only the methods in the main @interface body need to be overridden. Subclasses do not need to override the methods here. These methods do not need to be overridden, although subclasses may occasionally gain better performance from doing so.

Tasks

Other Methods

  • + empty

    Returns an empty stream.

  • + return:

    Returns a stream containing only the given value.

  • – bind:

    Returns a new stream which represents the combined result of all lazy applications of block.

  • – concat:

    Returns a new stream representing the receiver followed by stream.

  • – zipWith:

    Returns a new stream of RACTuples, representing the zipped values of the two streams.

Extension Methods

  •   name

    The name of the stream. This is for debugging/human purposes only.

    property
  • – setNameWithFormat:

    Returns the receiver, for easy method chaining.

Operations Methods

  • – flattenMap:

    Returns a new stream which represents the combined streams resulting from mapping block.

  • – flatten

    Returns a stream consisting of the combined streams obtained from the receiver.

  • – map:

    Returns a new stream with the mapped values.

  • – mapReplace:

    Returns a new stream which includes the given object once for each value in the receiver.

  • – filter:

    Returns a new stream with only those values that passed.

  • – ignore:

    Returns a new stream containing only the values which did not compare equal to value.

  • – reduceEach:

    Returns a new stream of reduced tuple values.

  • – startWith:

    Returns a stream consisting of value, followed by the values in the receiver.

  • – skip:

    Returns the receiver after skipping the first skipCount values. If skipCount is greater than the number of values in the stream, an empty stream is returned.

  • – take:

    Returns a stream of the first count values in the receiver. If count is greater than or equal to the number of values in the stream, a stream equivalent to the receiver is returned.

  • + zip:

    Returns a new stream containing RACTuples of the zipped values from the streams.

  • + zip:reduce:

    Returns a new stream containing the results from each invocation of reduceBlock.

  • + concat:

    Returns a stream obtained by concatenating streams in order.

  • – scanWithStart:reduce:

    Returns a new stream that consists of each application of reduceBlock. If the receiver is empty, an empty stream is returned.

  • – scanWithStart:reduceWithIndex:

    Returns a new stream that consists of each application of reduceBlock. If the receiver is empty, an empty stream is returned.

  • – combinePreviousWithStart:reduce:

    Returns a new stream consisting of the return values from each application of reduceBlock.

  • – takeUntilBlock:

    Returns a stream of the initial values in the receiver that fail predicate. If predicate never returns YES, a stream equivalent to the receiver is returned.

  • – takeWhileBlock:

    Returns a stream of the initial values in the receiver that pass predicate. If predicate never returns NO, a stream equivalent to the receiver is returned.

  • – skipUntilBlock:

    Returns a stream containing the values of the receiver that follow any initial values failing predicate. If predicate never returns YES, an empty stream is returned.

  • – skipWhileBlock:

    Returns a stream containing the values of the receiver that follow any initial values passing predicate. If predicate never returns NO, an empty stream is returned.

  • – distinctUntilChanged

    Returns a stream of values for which -isEqual: returns NO when compared to the previous value.

Unavailable Methods

Properties

name

@property (copy) NSString *name
Discussion

The name of the stream. This is for debugging/human purposes only.

Declared In

RACStream.h

Class Methods

concat:

+ (instancetype)concat:(id<NSFastEnumeration>)streams
Discussion

Returns a stream obtained by concatenating streams in order.

Declared In

RACStream.h

empty

+ (instancetype)empty
Discussion

Returns an empty stream.

Declared In

RACStream.h

return:

+ (instancetype)return:(id)value
Discussion

Returns a stream containing only the given value.

Declared In

RACStream.h

zip:

+ (instancetype)zip:(id<NSFastEnumeration>)streams
Discussion

Returns a new stream containing RACTuples of the zipped values from the streams.

Declared In

RACStream.h

zip:reduce:

+ (instancetype)zip:(id<NSFastEnumeration>)streams reduce:(id ( ^ ) ( ))reduceBlock
Discussion

Returns a new stream containing the results from each invocation of reduceBlock.

Declared In

RACStream.h

Instance Methods

bind:

- (instancetype)bind:(RACStreamBindBlock ( ^ ) ( void ))block
Discussion

Returns a new stream which represents the combined result of all lazy applications of block.

Declared In

RACStream.h

combinePreviousWithStart:reduce:

- (instancetype)combinePreviousWithStart:(id)start reduce:(id ( ^ ) ( id previous , id current ))reduceBlock
Discussion

Returns a new stream consisting of the return values from each application of reduceBlock.

Declared In

RACStream.h

concat:

- (instancetype)concat:(RACStream *)stream
Discussion

Returns a new stream representing the receiver followed by stream.

Declared In

RACStream.h

distinctUntilChanged

- (instancetype)distinctUntilChanged
Discussion

Returns a stream of values for which -isEqual: returns NO when compared to the previous value.

Declared In

RACStream.h

filter:

- (instancetype)filter:(BOOL ( ^ ) ( id value ))block
Discussion

Returns a new stream with only those values that passed.

Declared In

RACStream.h

flatten

- (instancetype)flatten
Discussion

Returns a stream consisting of the combined streams obtained from the receiver.

Declared In

RACStream.h

flattenMap:

- (instancetype)flattenMap:(RACStream *( ^ ) ( id value ))block
Discussion

Returns a new stream which represents the combined streams resulting from mapping block.

Declared In

RACStream.h

ignore:

- (instancetype)ignore:(id)value
Discussion

Returns a new stream containing only the values which did not compare equal to value.

Declared In

RACStream.h

map:

- (instancetype)map:(id ( ^ ) ( id value ))block
Discussion

Returns a new stream with the mapped values.

Declared In

RACStream.h

mapPreviousWithStart:reduce:

- (instancetype)mapPreviousWithStart:(id)start reduce:(id ( ^ ) ( id previous , id current ))combineBlock

mapReplace:

- (instancetype)mapReplace:(id)object
Discussion

Returns a new stream which includes the given object once for each value in the receiver.

Declared In

RACStream.h

reduceEach:

- (instancetype)reduceEach:(id ( ^ ) ( ))reduceBlock
Discussion

Returns a new stream of reduced tuple values.

Declared In

RACStream.h

scanWithStart:combine:

- (instancetype)scanWithStart:(id)startingValue combine:(id ( ^ ) ( id running , id next ))block

scanWithStart:reduce:

- (instancetype)scanWithStart:(id)startingValue reduce:(id ( ^ ) ( id running , id next ))reduceBlock
Discussion

Returns a new stream that consists of each application of reduceBlock. If the receiver is empty, an empty stream is returned.

Declared In

RACStream.h

scanWithStart:reduceWithIndex:

- (instancetype)scanWithStart:(id)startingValue reduceWithIndex:(id ( ^ ) ( id running , id next , NSUInteger index ))reduceBlock
Discussion

Returns a new stream that consists of each application of reduceBlock. If the receiver is empty, an empty stream is returned.

Declared In

RACStream.h

sequenceMany:

- (instancetype)sequenceMany:(RACStream *( ^ ) ( void ))block

setNameWithFormat:

- (instancetype)setNameWithFormat:(NSString *)format, ...
Discussion

Returns the receiver, for easy method chaining.

Declared In

RACStream.h

skip:

- (instancetype)skip:(NSUInteger)skipCount
Discussion

Returns the receiver after skipping the first skipCount values. If skipCount is greater than the number of values in the stream, an empty stream is returned.

Declared In

RACStream.h

skipUntilBlock:

- (instancetype)skipUntilBlock:(BOOL ( ^ ) ( id x ))predicate
Discussion

Returns a stream containing the values of the receiver that follow any initial values failing predicate. If predicate never returns YES, an empty stream is returned.

Declared In

RACStream.h

skipWhileBlock:

- (instancetype)skipWhileBlock:(BOOL ( ^ ) ( id x ))predicate
Discussion

Returns a stream containing the values of the receiver that follow any initial values passing predicate. If predicate never returns NO, an empty stream is returned.

Declared In

RACStream.h

startWith:

- (instancetype)startWith:(id)value
Discussion

Returns a stream consisting of value, followed by the values in the receiver.

Declared In

RACStream.h

take:

- (instancetype)take:(NSUInteger)count
Discussion

Returns a stream of the first count values in the receiver. If count is greater than or equal to the number of values in the stream, a stream equivalent to the receiver is returned.

Declared In

RACStream.h

takeUntilBlock:

- (instancetype)takeUntilBlock:(BOOL ( ^ ) ( id x ))predicate
Discussion

Returns a stream of the initial values in the receiver that fail predicate. If predicate never returns YES, a stream equivalent to the receiver is returned.

Declared In

RACStream.h

takeWhileBlock:

- (instancetype)takeWhileBlock:(BOOL ( ^ ) ( id x ))predicate
Discussion

Returns a stream of the initial values in the receiver that pass predicate. If predicate never returns NO, a stream equivalent to the receiver is returned.

Declared In

RACStream.h

zipWith:

- (instancetype)zipWith:(RACStream *)stream
Discussion

Returns a new stream of RACTuples, representing the zipped values of the two streams.

Declared In

RACStream.h