#import #import "Mappable.h" #import "Foldable.h" #import "Enumerable.h" #import "Flattenable.h" @class Sequence; @interface Option : NSObject -(BOOL)isEmpty; -(id)get; - (id)getSafely; -(id)getOrElse:(id)other; -(id)getOrInvoke:(id (^)())funcBlock; - (id)flatMap:(id (^)(id))funcBlock; -(Sequence *)asSequence; - (void)maybe:(void (^)(id))invokeWhenSomeBlock; +(id)option:(id)value; @end static Option* option(id value) { return [Option option:value]; }