ivanmorgillo
04/04/2019, 4:21 PMsuspend fun fetchProfile(...) : Either<ProfileError, Profile>
you have quite a bit of referential transparency. Everything that you need to know to use the API is there, in the signature.
with IO<Profile>
, sure I know that I can do async, lazy evaluation and I'm safe from exceptions, but I loose all the knowledge about the error domain 🤔