Does anybody have an idea on how to make this code more idiomatic? I tried to use scalaz Traverse, but it didn't really help.Given the types and method signatures:  type HTTPResult = Future[Either[Throwable, String]]  type FeedResult = Either[Throwable, Feed]  def fetchHtml(item: FeedItem): HTTPResult  def fetchFeed(feedUrl: String): HTTPResultFeed and FeedItem are case classes.I am looking for a way to simplify this function:  def fetchAll(feedUrl: String): FeedResult = {    val feed = fetchFeed(feedUrl).apply().right.flatMap(Feed.fromXml).right    val scoredItems = feed.map {      _.items.par.map { feedItem         fetchHtml(feedItem).apply().right.map { feedHtml           feedItem.copy(score = Feed.findScore(feedHtml))        }      }.foldLeft(List[FeedItem]())((acc, itemE)         itemE match {          case Left(t)             logger.error(Could not download item score: , t)            acc          case Right(v)  v :: acc        })    }    scoredItems.right.flatMap(l  feed.map(_.copy(items = l)))  }I tried using for, but I am using mostly map, not flatMap and the types are different, so I can't really use for for everything and would get a weird mixture.Any idea?
Idiomatic Scala for nested map/flatmap
functional programming;scala