harbor run -t openthoughts/tasktrove-exp-rpt-curriculum-easy-curriculum-easy-0239harbor download openthoughts/tasktrove-exp-rpt-curriculum-easy-curriculum-easy-0239Goal
What to implement (reduced scope)
In app/returns/io.py
In app/returns/future.py
Behavior expected by tests (simplified)
Decorated async function example: from returns.future import FutureResult, future_safe from returns.io import IOSuccess
@future_safe async def _coro(arg: int) -> float: return 1 / arg
f = _coro(2) assert isinstance(f, FutureResult) result = await f assert result == IOSuccess(0.5)
On exceptions (e.g., arg == 0), awaiting the FutureResult should yield an instance of IOResult.failure_type (i.e., IOFailure).
Notes and hints
Usage example (for guidance)
Implementation should be self-contained, with no external dependencies.