```fun areRemindersEnabled(): IO<Unit, Boolean&...
# arrow
i
Copy code
fun areRemindersEnabled(): IO<Unit, Boolean> =
        storage.load<Boolean>(key)
            .handleError { false }
            .mapError { Unit }
s
why unit? if you are handling the error it should be
Nothing
i
using
Nothing
I'm not able to map the error
message has been deleted
s
give me a min
i
message has been deleted
I'm calling it a day, man. we need to do this tomorrow if you available
we can pair with teamviewer 😄
s
Copy code
fun <T> load(key: String): IO<String, T> = TODO()

fun areRemindersEnabled(): IO<Nothing, Boolean> {
    val storedReminderSettings: IO<String, Boolean> = load("whatever")
    return storedReminderSettings
        .handleError({ TODO() }, { false })
}
so
IO<E, A>
can fail with
E
or can fail with
Throwable
here I am handling the
Throwable
with
TODO()
and the
String
with
false
sure, ping me on twitter, we can do ti 😂