stojan
11/17/2018, 7:59 PMAsync
the right typeclass? Do you see anything I could do better?Leandro Borges Ferreira
11/18/2018, 3:38 PMfun <F> getStrLn(A: MonadDefer<F>): Kind<F, String> =
A.run {
A.defer {
readLine().toOption()
.fold({
raiseError<String>(IOException("Failed to read input!"))
}, {
just(it)
})
}
}
stojan
11/18/2018, 8:41 PM