@interface RACSequence<__covariant ValueType> : RACStream <NSCoding, NSCopying, NSFastEnumeration>
@property (nonatomic, strong, readonly, nullable) ValueType head;
@property (nonatomic, strong, readonly, nullable) RACSequence<ValueType> *tail;
@property (nonatomic, copy, readonly) NSArray<ValueType> *array;
@property (nonatomic, copy, readonly) NSEnumerator<ValueType> *objectEnumerator;
@property (nonatomic, copy, readonly) RACSequence<ValueType> *eagerSequence;
@property (nonatomic, copy, readonly) RACSequence<ValueType> *lazySequence;
- (RACSignal<ValueType> *)signal;
- (RACSignal<ValueType> *)signalWithScheduler:(RACScheduler *)scheduler;
- (id)foldLeftWithStart:(nullable id)start reduce:(id _Nullable (^)(id _Nullable accumulator, ValueType _Nullable value))reduce;
- (id)foldRightWithStart:(nullable id)start reduce:(id _Nullable (^)(id _Nullable first, RACSequence *rest))reduce;
- (BOOL)any:(BOOL (^)(ValueType _Nullable value))block;
- (BOOL)all:(BOOL (^)(ValueType _Nullable value))block;
- (nullable ValueType)objectPassingTest:(BOOL (^)(ValueType _Nullable value))block;
+ (RACSequence<ValueType> *)sequenceWithHeadBlock:(ValueType _Nullable (^)(void))headBlock tailBlock:(nullable RACSequence<ValueType> *(^)(void))tailBlock;
@end
@interface RACSequence<__covariant ValueType> (RACStream)
+ (RACSequence<ValueType> *)return:(nullable ValueType)value;
+ (RACSequence<ValueType> *)empty;
typedef RACSequence * _Nullable (^RACSequenceBindBlock)(ValueType _Nullable value, BOOL *stop);
- (RACSequence *)bind:(RACSequenceBindBlock (^)(void))block;
- (RACSequence *)concat:(RACSequence *)sequence;
- (RACSequence<RACTuple *> *)zipWith:(RACSequence *)sequence;
@end
@interface RACSequence<__covariant ValueType> (RACStreamOperations)
- (RACSequence *)flattenMap:(__kindof RACSequence * _Nullable (^)(ValueType _Nullable value))block;
- (RACSequence *)flatten;
- (RACSequence *)map:(id _Nullable (^)(ValueType _Nullable value))block;
- (RACSequence *)mapReplace:(nullable id)object;
- (RACSequence<ValueType> *)filter:(BOOL (^)(id _Nullable value))block;
- (RACSequence *)ignore:(nullable ValueType)value;
- (RACSequence *)reduceEach:(id _Nullable (^)())reduceBlock;
- (RACSequence<ValueType> *)startWith:(nullable ValueType)value;
- (RACSequence<ValueType> *)skip:(NSUInteger)skipCount;
- (RACSequence<ValueType> *)take:(NSUInteger)count;
+ (RACSequence<RACTuple *> *)zip:(id<NSFastEnumeration>)sequence;
+ (RACSequence<ValueType> *)zip:(id<NSFastEnumeration>)sequences reduce:(id _Nullable (^)())reduceBlock;
+ (RACSequence<ValueType> *)concat:(id<NSFastEnumeration>)sequences;
- (RACSequence *)scanWithStart:(nullable id)startingValue reduce:(id _Nullable (^)(id _Nullable running, ValueType _Nullable next))reduceBlock;
- (RACSequence *)scanWithStart:(nullable id)startingValue reduceWithIndex:(id _Nullable (^)(id _Nullable running, ValueType _Nullable next, NSUInteger index))reduceBlock;
- (RACSequence *)combinePreviousWithStart:(nullable ValueType)start reduce:(id _Nullable (^)(ValueType _Nullable previous, ValueType _Nullable current))reduceBlock;
- (RACSequence<ValueType> *)takeUntilBlock:(BOOL (^)(ValueType _Nullable x))predicate;
- (RACSequence<ValueType> *)takeWhileBlock:(BOOL (^)(ValueType _Nullable x))predicate;
- (RACSequence<ValueType> *)skipUntilBlock:(BOOL (^)(ValueType _Nullable x))predicate;
- (RACSequence<ValueType> *)skipWhileBlock:(BOOL (^)(ValueType _Nullable x))predicate;
- (RACSequence<ValueType> *)distinctUntilChanged;
ReactiveObjC (三五)(RACSequence)
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 1 最近这几天足坛可谓高潮迭起,当大家都因为萨德事件气愤不已时,国足以1:0战胜韩国,为国人大大出了一口气。 可就...
- 8月22日,经过层层细致审核和严格筛选,民政部公示首批慈善组织互联网募捐信息平台遴选结果,腾讯公益、新浪微博微公益...