What's the difference between `"myerror".left()` a...
# arrow
s
What's the difference between
"myerror".left()
and
"myerror".raiseError()
?
r
left
is an specific constructor for Either but
raiseError
is the generic constructor for
ApplicativeError
. Either provides an instance for Applicative Error so it has both. Any type that provides ApplicativeError such as Either, IO, Validated etc, they also have
raiseError
in addition to their specific constructors.
s
I see thanks.
👍 3