Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
[writing-async-app-in-scala-part-3] multiple transformations
def rpcCall: Future[String] = ???
.filter(_.length < 4)
.map {
case Array(single) => single
case Array(first, second@_) => first
case Array(first@_, second, third@_) => third
case _ => ""
.map(value => s"<p>$value</p>")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment