Last active
July 27, 2016 14:55
-
-
Save eamelink/8852888f487429b3f92aea686bc50770 to your computer and use it in GitHub Desktop.
Dependent tasks
This file contains 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
// Can we implement `dependentTasks` in a functional way? | |
// Is it a terrible idea to implement this? Why? | |
def dependentTasks: (String => Task[String], String => Task[String]) = ??? | |
val (f1, f2) = dependentTasks | |
val t1 = f1("foo") | |
val t2 = f2("bar") | |
assert(t1.unsafeRun == "foo-bar") | |
assert(t2.unsafeRun == "bar-foo") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment