[docs]defbind_async(function:Callable[[_FirstType],Awaitable[KindN[_FutureKind,_UpdatedType,_SecondType,_ThirdType]],],)->Kinded[Callable[[KindN[_FutureKind,_FirstType,_SecondType,_ThirdType]],KindN[_FutureKind,_UpdatedType,_SecondType,_ThirdType],]]:""" Compose a container and ``async`` function returning a container. In other words, it modifies the function's signature from: ``a -> Awaitable[Container[b]]`` to: ``Container[a] -> Container[b]`` This is how it should be used: .. code:: python >>> import anyio >>> from returns.future import Future >>> from returns.io import IO >>> from returns.pointfree import bind_async >>> async def coroutine(x: int) -> Future[str]: ... return Future.from_value(str(x + 1)) >>> bound = bind_async(coroutine)(Future.from_value(1)) >>> assert anyio.run(bound.awaitable) == IO('2') Note, that this function works for all containers with ``.bind_async`` method. See :class:`returns.primitives.interfaces.specific.future.FutureLikeN` for more info. """@kindeddeffactory(container:KindN[_FutureKind,_FirstType,_SecondType,_ThirdType],)->KindN[_FutureKind,_UpdatedType,_SecondType,_ThirdType]:returncontainer.bind_async(function)returnfactory