FunctionalObjectiveC 0.9.29

FunctionalObjectiveC 0.9.29

Maintained by Leon.



  • By
  • Leon

FunctionalObjectiveC

CI Status Version License Platform

Example

NSArray *numbers = @[@1, @2, @3, @4];
NSNumber *sum = F.reduce [F.add] [@0] [numbers];
XCTAssertEqualObjects(sum, @10);

Requirements

Installation

FunctionalObjectiveC is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'FunctionalObjectiveC'

Checklist

Constant

  • always
  • true
  • false

Arithmatic

  • add
  • subtract
  • multiply
  • divide
  • modulo
  • negate
  • inc
  • dec

Mathematics

  • acos
  • asin
  • atan
  • atan2
  • cos
  • sin
  • tan
  • acosh
  • asinh
  • atanh
  • cosh
  • sinh
  • tanh
  • exp
  • exp2
  • expm1
  • log
  • log10
  • log2
  • log1p
  • logb
  • modf
  • ldexp
  • frexp
  • ilogb
  • scalbn
  • fabs
  • cbrt
  • hypot
  • pow
  • sqrt
  • erf
  • erfc
  • lgamma
  • tagmma
  • ceil
  • floor
  • nearbyint
  • rint
  • lrint
  • round
  • lround
  • llrint
  • llround
  • trunc
  • fmod
  • remainder
  • remquo
  • copysign
  • nan
  • nextafter
  • nexttoward
  • fdim
  • fmax
  • fmin
  • fma

Comparison

  • eq
  • neq
  • gt
  • gte
  • lt
  • lte
  • max
  • min

Logical

  • not
  • none
  • complement
  • and
  • both
  • all
  • allPass
  • or
  • either
  • any
  • anyPass

Character

  • isControl
  • isSpace
  • isLower
  • isUpper
  • isAlpha
  • isAlphaNum
  • isPrint
  • isDigit
  • isOctDigit
  • isHexDigit
  • isLetter
  • isMark
  • isNumber
  • isPunctuation
  • isSymbol
  • isSeparator
  • isAscii
  • isLatin1
  • isAsciiUpper
  • isAsciiLower
  • generalCategory
  • toUpper
  • toLower
  • toTitle
  • digitToInt
  • intToDigit
  • ord
  • chr
  • showLitChar
  • lexLitChar
  • readLitChar

String

  • test
  • match
  • replace
  • trim
  • lines
  • words
  • unlines
  • unwords

Array

  • of
  • pair
  • range
  • repeat
  • times
  • aperture
  • xprod
  • transpose
  • uniq
  • uniqBy
  • uniqWith
  • unnest
  • zip
  • zipWith
  • mean
  • median
  • sum
  • product

Dictionary

  • keys
  • values
  • fromPairs
  • toPairs
  • pick
  • pickAll
  • pickBy
  • project
  • indexBy
  • groupBy
  • groupWith
  • merge
  • mergeWith
  • mergeWithKey
  • mergeAll
  • invert
  • omit

Collection

  • isEmpty
  • length
  • empty
  • map
  • mapAccum
  • mapAccumRight
  • filter
  • reject
  • forEach
  • contains
  • reduce
  • reduceRight
  • reduced
  • reduceBy
  • reduceWhile
  • scan
  • chain
  • flatten
  • partition
  • without

Ordered Collection

  • nth
  • head
  • last
  • slice
  • init
  • tail
  • insert
  • insertAll
  • intersperse
  • append
  • prepend
  • concat
  • update
  • adjust
  • remove
  • drop
  • dropWhile
  • dropLast
  • dropLastWhile
  • dropRepeats
  • dropRepeatsWith
  • take
  • takeWhile
  • takeLast
  • takeLastWhile
  • split
  • splitAt
  • splitEvery
  • splitWhen
  • join
  • indexOf
  • lastIndexOf
  • find
  • findIndex
  • findLast
  • findLastIndex
  • startsWith
  • endsWith
  • reverse

Control Flow

  • when
  • unless
  • ifElse
  • cond
  • until
  • defaultTo

Object

  • is
  • isNil
  • type
  • clone
  • has
  • prop
  • props
  • propIs
  • propEq
  • propOr
  • propSatisfies
  • eqProps
  • path
  • pathSatisfies
  • assoc
  • assocPath
  • dissoc
  • dissocPath

Sort

  • sort
  • sortBy
  • sortWith
  • ascend
  • descend
  • maximum
  • maximumBy
  • minimum
  • minimumBy

Lens

  • lens
  • lensProp
  • lensPath
  • lensIndex
  • view
  • set
  • over

Debug

  • print

Author

Leon, [email protected]

License

FunctionalObjectiveC is available under the MIT license. See the LICENSE file for more info.