Does Arrow provide support for partial functions? ...
# arrow
s
Does Arrow provide support for partial functions? (Not partially-_applied_/curried functions) eg., in
eitherAB.handleError
I might want to handle
A
with a
B
under certain conditions or for certain subtypes of
A
. instead, I’d have to
handleErrorWith
and have a catch-all case re-wrapping in Left.
(which is to say that for ApplicativeError specifically, I’d want
recover
and
recoverWith
from cats)
Is this limited at a language level? Could macros get around Kotlin’s limited pattern matching? Perhaps the gap could be bridged with optional functions?