I have a method which returns Task[List[List[A]]] and I need to transform to Task[A] if the list is greater than 0
def method():Task[List[List[A]]] = {}
val d:Task[List[A]] = method().map(_.flatten)
How to get Task[A] is a list of A if the inner method has more than 0 elements
I am able to convert to Task[List[A]] as you can see above