forked from leuchtetgruen/Functional.m
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNSArray+F.h
37 lines (30 loc) · 1.13 KB
/
NSArray+F.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
// NSArray+F.h
// Functional
//
// Created by Hannes Walz on 07.04.12.
// Copyright 2012 leuchtetgruen. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "F.h"
@interface NSArray(F)
- (void) each:(VoidIteratorArrayBlock) block;
- (void) eachWithIndex:(VoidIteratorArrayWithIndexBlock) block;
- (NSArray *) map:(MapArrayBlock) block;
- (id) reduce:(ReduceArrayBlock) block withInitialMemo:(id) memo;
- (NSArray *) filter:(BoolArrayBlock) block;
- (NSArray *) reject:(BoolArrayBlock) block;
- (BOOL) isValidForAll:(BoolArrayBlock) block;
- (BOOL) isValidForAny:(BoolArrayBlock) block;
- (NSNumber *) countValidEntries:(BoolArrayBlock) block;
- (id) max:(CompareArrayBlock) block;
- (id) min:(CompareArrayBlock) block;
- (NSArray *) sort:(NSComparator) block;
- (NSDictionary *) group:(MapArrayBlock) block;
- (NSArray *) dropWhile:(BoolArrayBlock) block;
- (id) first;
- (NSArray *) reverse;
- (NSArray *) arrayUntilIndex:(NSInteger) idx;
- (NSArray *) arrayFromIndexOn:(NSInteger) idx;
+ (NSArray *) arrayFrom:(NSInteger) from To:(NSInteger) to;
@end