In Ch. 4.5.2, the book shows a simple example of using handleError method, which maps the error type String to ErrorOr[String] so the resulting type is nested ErrorOr[ErrorOr[String]] which possibly confound readers to think handleError takes E => F[A]. I would change the example to handleError returns some Int instead of ErrorOr[String] because it's simpler and coherent with the previous code example.
In Ch. 4.5.2, the book shows a simple example of using
handleError
method, which maps the error typeString
toErrorOr[String]
so the resulting type is nestedErrorOr[ErrorOr[String]]
which possibly confound readers to thinkhandleError
takesE => F[A]
. I would change the example tohandleError
returns someInt
instead ofErrorOr[String]
because it's simpler and coherent with the previous code example.