funcool

A channel for discussing and asking questions about Funcool libraries https://github.com/funcool/
2018-08-25T15:23:03.000100Z

Hi guys, does cats have mapcat?

2018-08-25T15:23:08.000100Z

I’m trying to translate this code:

2018-08-25T15:23:23.000100Z

import scala.io.Source
def getURLContent(url: String): Try[Iterator[String]] =
  for {
    url <- parseURL(url)
    connection <- Try(url.openConnection())
    is <- Try(connection.getInputStream)
    source = Source.fromInputStream(is)
  } yield source.getLines()
taken from https://danielwestheide.com/blog/2012/12/26/the-neophytes-guide-to-scala-part-6-error-handling-with-try.html to see what it would look like