@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)
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
相关阅读更多精彩内容
- 1 最近这几天足坛可谓高潮迭起,当大家都因为萨德事件气愤不已时,国足以1:0战胜韩国,为国人大大出了一口气。 可就...
- 8月22日,经过层层细致审核和严格筛选,民政部公示首批慈善组织互联网募捐信息平台遴选结果,腾讯公益、新浪微博微公益...