Swiftpack.co - Package - glessard/composition

Composition Build Status

Function composition operator for Swift

See https://wiki.haskell.org/Function_composition or http://mathworld.wolfram.com/Composition.html

This is usually represented in math by something like ⸰

That is difficult to type on most keyboards, but the bullet is fairly easy.

This package defines •, which is typable on most macs (option-8).

It is defined as follows:

public func • <A,B,C> (functionA: @escaping (A) -> B, functionB: @escaping (B) -> C) -> (A) -> C
{
  return { functionB(functionA($0)) }
}

Github

link
Stars: 0
Help us keep the lights on

Dependencies

Used By

Total:

Releases

2.1.0 - Aug 8, 2017

Package description updated for Swift 4

2.0.0 - Dec 14, 2016