FoundationExtension
FoundationExtension is common Foundation/UIKit/Cocoa shortcuts and snippets collection.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
NSSet(Functional) Category Reference

See Map/Filter/Reduce for concept of functional tools. More...

#import <NSAFunctional.h>

Instance Methods

(void) - applyProcedure:
 Apply procedure to objects. More...
 
(NSArray *) - arrayByMappingOperator:
 Returns an array of the result objects of mapping the given mappter to objects. More...
 
(NSArray *) - arrayByMapFilteringOperator:
 Returns an array of the result objects of mapping the given mappter to objects which is not nil. More...
 
(NSArray *) - arrayByFilteringOperator:
 Filters objects and returns result as array. More...
 
(id) - reduce:
 Reduces objects and returns the result. More...
 
(id) - reduce:initialObject:
 Reduces objects and returns the result. More...
 
(NSSet *) - setByMappingOperator:
 Maps mapper to objects and returns the result as set. More...
 
(NSSet *) - setByMapFilteringOperator:
 Maps mapper to objects and filters nil result and returns the result as set. More...
 
(NSSet *) - setByFilteringOperator:
 Filters objects and returns result as set. More...
 
(id) - firstObjectByFilteringOperator:
 Filters objects and returns the first object of result. More...
 

Detailed Description

See Map/Filter/Reduce for concept of functional tools.

Set is treated as variation of array.

See also
NSAFunctional.h

Method Documentation

- (void) applyProcedure: (NSAObjectProcedure procedure

Apply procedure to objects.

Shallow wrapper of NSAApply

See also
NSAApply
- (NSArray *) arrayByFilteringOperator: (NSAObjectPicker filter

Filters objects and returns result as array.

Shallow wrapper of NSAFilter

See also
NSAFilter
objectsPassingTest:
- (NSArray *) arrayByMapFilteringOperator: (NSAObjectUnaryOperator mapper

Returns an array of the result objects of mapping the given mappter to objects which is not nil.

Shallow wrapper of NSAMapFilter

See also
NSAMapFilter
- (NSArray *) arrayByMappingOperator: (NSAObjectUnaryOperator mapper

Returns an array of the result objects of mapping the given mappter to objects.

Shallow wrapper of NSAMap

See also
NSAMap
- (id) firstObjectByFilteringOperator: (NSAObjectPicker filter

Filters objects and returns the first object of result.

Shallow wrapper of NSAFilterWithIndex

See also
NSAFilter
- (id) reduce: (NSAObjectBinaryOperator reduce

Reduces objects and returns the result.

Shallow wrapper of NSAReduce

See also
NSAReduce
- (id) reduce: (NSAObjectBinaryOperator reduce
initialObject: (id)  initialObject 

Reduces objects and returns the result.

Shallow wrapper of NSAReduceWithInitialObject

See also
NSAReduceWithInitialObject
- (NSSet *) setByFilteringOperator: (NSAObjectPicker filter

Filters objects and returns result as set.

Shallow wrapper of NSAFilter

See also
NSAFilter
- (NSSet *) setByMapFilteringOperator: (NSAObjectUnaryOperator mapper

Maps mapper to objects and filters nil result and returns the result as set.

Shallow wrapper of NSAMapFilter

See also
NSAMapFilter
- (NSSet *) setByMappingOperator: (NSAObjectUnaryOperator mapper

Maps mapper to objects and returns the result as set.

Shallow wrapper of NSAMap

See also
NSAMap

The documentation for this category was generated from the following file: