diff --git a/ducktape/src/main/scala/io/github/arainko/ducktape/Mode.scala b/ducktape/src/main/scala/io/github/arainko/ducktape/Mode.scala index 5f93f8d7..8248c8b4 100644 --- a/ducktape/src/main/scala/io/github/arainko/ducktape/Mode.scala +++ b/ducktape/src/main/scala/io/github/arainko/ducktape/Mode.scala @@ -19,6 +19,10 @@ sealed trait Mode[F[+x]] { } object Mode { + extension [F[+x], M <: Mode[F]](self: M) { + inline def locally[A](inline f: M ?=> A): A = f(using self) + } + trait Accumulating[F[+x]] extends Mode[F] { def product[A, B](fa: F[A], fb: F[B]): F[(A, B)] }