I am updating my assembly to use the new macro syntax as far as I can and have come across flatMap , which I do not know how to deal with.
Say I had a task like this
myTask <<= (foo, bar) flatMap { (x, y) => someFunctionProducingATask(x, y, 5) }
Now Def.taskDyn looks skeptical promising, but not quite suitable. Translating it to a naive thing does not work:
myTask <<= Def.taskDyn { val x = foo.value val y = bar.value someFunctionProducingATask(x, y, 5)
Initialize feels monadic, but I canβt find pure for it, so I donβt know how to include my task in it, or even if it is desirable. The docs don't seem to say anything, except that I use taskDyn . Does anyone have any ideas?
source share