Slide 19
Slide 19 text
: > Bow provides us functional programming in Swift
import Bow
:
Either
Sum type of types `A` and `B`. Represents a value of either
one of those types, but not both at the same time. Values
of type `A` are called left ; values of type `B` are
called right .
let either = Either.right("Either")
either.fold( { _ in "Default" },
{ input in "Great \(input)!" } )
Great Either!
@miguelangel_dl | #AltConfMadrid | @bow_swift