TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Jun 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Kevin McGladdery.
Either is an implementation of Haskell’s Either
type in Swift. The current version (1.x) is compatible with Swift 3.
Either is an enum consisting of either a .right or a .left, each with an associated value. It’s commonly used in Haskell for error handling, with Right holding a success value and Left holding a failure value. This is a more functional way of handling errors compared to throwing and catching.
The best way to see this library in action is by looking at the tests. Each function is also commented upon in the Either source.
Kevin McGladdery, [email protected]
Either is available under the MIT license. See the LICENSE file for more info.