How to use IO compositions in arrow-kt within sync context
问题 I have following interfaces: interface UserRepository { fun role(codename: String): IO<Option<Role>> fun accessRights(roleId: Long): IO<List<AccessRight>> } Now trying to use it to compose effectfful operations like this: private fun retrieveRole(roleCodename: String): IO<Option<RoleTo>> = IO.fx { val role = userRepository.role(roleCodename).bind() role.map { r -> val ar = userRepository.accessRights(r.id).bind() RoleTo.of(r, ar) } } The code fails to compile on the second bind (call to