Fancy implementation of Either monad.
@type either() :: {:ok, any()} | {:error, any()}
@type fun() :: (any() -> any())
@spec map(either(), (... -> any())) :: either()