I have a Process[Task,A]. A contains a Seq of Bs
case class A(elems:Seq[B])
I would like to transform the Process[Task,A] into a Process[Task,B]
def streamOfAs:Process[Task,A] = ???
streamOfBs1:Process[Task,Member] = streamOfAs.flatMap(Process.emit(_.elems)) //Compiler error
streamOfBs2:Process[Task,Member] = streamOfAs pipe process1.lift((a:A) => a.elems) //yields Process[Task,Seq[B]]
are there any buildtin functions to achieve this?
If I understand correctly the case class A is essentially function A => Seq[B]
then solution would be perhaps