This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface Tuple : NSObject | |
@property (readonly, nonatomic) id _1; | |
@property (readonly, nonatomic) id _2; | |
+ (id)tupleWithFirst:(id)_1 second:(id)_2; | |
- (id)initWithFirst:(id)_1 second:(id)_2; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define tuple(_1, _2) [Tuple tupleWithFirst:_1 second:_2]; | |
@interface Tuple : NSObject | |
@property (readonly, nonatomic) id _1; | |
@property (readonly, nonatomic) id _2; | |
+ (id)tupleWithFirst:(id)_1 second:(id)_2; | |
- (id)initWithFirst:(id)_1 second:(id)_2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSString *)randStringWithMaxLenght:(NSInteger)max { | |
NSInteger length = [self randBetween:1 max:max]; | |
unichar letter[length]; | |
for (int i = 0; i < length; i++) { | |
letter[i] = [self randBetween:65 max:90]; | |
} | |
return [[NSString alloc] initWithCharacters:letter length:length]; | |
} | |
- (NSInteger)randBetween:(NSInteger)min max:(NSInteger)max { | |
return (random() % (max - min + 1)) + min; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
typedef id (^fanc_t)(id); | |
typedef void (^noReturn_t)(id); | |
@interface NSArray (Fanctional) | |
+ (NSArray *)from:(NSInteger)from to:(NSInteger)to; | |
- (NSArray *)map:(fanc_t)fanc; |
NewerOlder