I'd have to dig something up. But theoretically sp...
# arrow
d
I'd have to dig something up. But theoretically speaking, applicative's killer function is
(A -> B -> C) -> (F<A> -> F<B> -> F<C>)
- basically, turn any arity function into a function that accepts applicatives and returns an applicative. So because
Option
is applicative, you could convert
val add: (Int, Int) -> Int
into
val addOption: (Option<Int>, Option<Int>) -> Option<Int>
using Applicative