Created
October 25, 2017 18:49
-
-
Save danslapman/09107733876546a34d42dd5df0e7e893 to your computer and use it in GitHub Desktop.
Lazy future
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type LazyFuture[T] = ReaderT[Future, ExecutionContext, T] | |
object LazyFuture { | |
def apply[T](value: => T): LazyFuture[T] = ReaderT.apply { implicit ExecutionContext => | |
Future(value) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment