New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conveniences that could be added to DBIO #2878
Comments
|
cats-effect IO has these meanings for def delay[A](thunk: => A): IO[A] = ???
def defer[A](thunk: => IO[A]): IO[A] = delay(thunk).flatten ZIO has def defer[A](config: => Config[A]): Config[A] Following this logic, the signature of the object DBIO {
def defer[A](a: => DBIO[A]): DBIO[A]
} In terms of the side-effect suspension, ZIO has: def attempt[A](code: => A)(implicit trace: Trace): Task[A]
def succeed[A](a: => A)(implicit trace: Trace): ZIO[Any, Nothing, A] Do you think we should consider other names for the
Since the |
Not sure. Another options is
|
DBIO.unit: DBIO[Unit]
DBIO.traverse[A, B, C[x] <: Iterable[x]](C[A])(A => DBIO[B]): DBIO[C[B]]
DBIO.defer[A](=>A): DBIO[A]
[A] DBIO[A]#void: DBIO[Unit]
(or another name)The text was updated successfully, but these errors were encountered: