_make_request, IO.lift(box(_parse_json)), )(user_id) @impure @safe def _make_request(user_id: int) -> requests.Response: response = requests.get('/api/user/{0}'.format(user_id)) response.raise_for_status() return response @safe def _parse_json(response: requests.Response) -> 'User': return response.json()