This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.List; | |
import rx.Observable; | |
import rx.subjects.PublishSubject; | |
public class ObservableListExample { | |
public static class ObservableList<T> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ejecutarCallBack[T](fut: Future[T], callback:String): Unit = { | |
fut onComplete { | |
case Success(x) => { | |
println(s"Haciendo callback a: $callback con body ${x.toString}") | |
val pipeline: HttpRequest => Future[HttpResponse] = sendReceive | |
val response: Future[HttpResponse] = pipeline(Post(callback, x.toString())) | |
} | |
case Failure(t) => println(s"Hubo una falla ${t.getMessage}") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
El error que arroja el compilador es: | |
type mismatch; found : List[String] required: List[(Option[String], String)] Note that implicit conversions are not applicable because they are ambiguous: both method List2Tuple in object StringImplicits of type (lista: List[String])List[(None.type, String)] and method List2Tuple2 in object StringImplicits2 of type (lista: List[String])List[(Some[String], String)] are possible conversion functions from List[String] to List[(Option[String], String)] Main.scala /scala_school/src/scala_school line 27 Scala Problem | |