NSEnumerator+OCTotallyLazy.h 456 B

12345678910111213141516
  1. #import <Foundation/Foundation.h>
  2. #import "Option.h"
  3. #import "Predicates.h"
  4. @interface NSEnumerator (OCTotallyLazy)
  5. - (NSEnumerator *)drop:(int)toDrop;
  6. - (NSEnumerator *)dropWhile:(BOOL (^)(id))filterBlock;
  7. - (NSEnumerator *)filter:(BOOL (^)(id))filterBlock;
  8. - (NSEnumerator *)flatten;
  9. - (NSEnumerator *)map:(id (^)(id))func;
  10. - (NSEnumerator *)take:(int)n;
  11. - (NSEnumerator *)takeWhile:(BOOL (^)(id))predicate;
  12. - (Option *)find:(PREDICATE)predicate;
  13. @end