Skip to content
Snippets Groups Projects
05-parallel-implementation.scala 149 B
Newer Older
package lecture1

def parallel[A, B](taskA: => A, taskB: => B): (A, B) =
  val tB: Task[B] = task {
    taskB
  }
  val tA: A = taskA
  (tA, tB.join)