T <: Traversable. However, this method relies on
flatMap. This leads to
StackOverflowErrorif the input is too long. Do you know of any better way to do this?
case class ManagedResourceSequence[a](resource: Seq[a]). Do you see any problems with this?