tryCatchK<R, A> static method
Converts a Future that may throw to a Future that never throws but returns a Option instead.
Used to handle asynchronous computations that may throw using Option.
It wraps the TaskOption.tryCatch
factory to make chaining with flatMap
easier.
Implementation
static TaskOption<R> Function(A a) tryCatchK<R, A>(
Future<R> Function(A a) run) =>
(a) => TaskOption.tryCatch(() => run(a));