This is a Swift framework providing a number of functions and types that I miss in Swift standard library.
The Signal is a stream of values over time
The Property is a value + signal with changes
The Promise is an async version of Result. Promises can be used instead of completion handlers to avoid nested closures.
Any type that has empty value and can be comined.
Identity function same as { $0 }
A constant function. Takes a value and returns a function that returns that value no matter what it is fed.
let f = weakify(self) { $0.handleEvent }
equals to
let f = { [weak self] in
guard let self = self else { return }
self.handleEvent($0)
}
Currying takes a function of >1 parameter and returns a function of one parameter which returns a function of one parameter, and so on. That is, given (A, B) -> C
, currying returns A -> B -> C
.
⛔️ Carthage support is deprecated starting v3.0.0. Install using Swift Package Manager