macdrive 8 pro crack free download for windows
mac drive 8 pro free download
mac drive 8
References
Category:1998 softwareQ:
scala Future returning a dictionary
I am trying to take a dictionary and convert it to scala Future using Future.valueAs[String, String], so that I can query the API later.
I am trying to use Future.valueAs[String, String] because I need to translate a query from a dict to a query.
This is the implementation of the method I am trying to convert:
def valueAs[V](v: T)(f: V => T): Future[T] = {
scala.concurrent.Future {
try {
//assume ret is a result type of Future.
ret
} catch {
case e: Throwable =>
throw new Exception("Unable to convert " + v + " to " + ret)
}
}
}
This is the code that is called by the method in question:
val d = Http().get("")
val u = d.map {
case (username, url) => (username, url)
}
val request = for {
username T)is not a member of scala.util.Try
Any idea how to fix this?
A:
You've got two things going wrong. First, you're not mapping over the Future in the first place. You need something like:
val futureDictionary = request.map(r => r.map(...).map(...)...).map(...)
The other issue, though, is that you're trying to map over the Future, which won't work ac619d1d87
Related links:
Comentarios