GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Quiz

Scala Quiz - 2

himanshu arora 10 Fragen

Quiz starten

Dieses Quiz hat ein Zeitlimit und öffnet sich deshalb im gewohnten Player.

Fragen in diesem Quiz (10)

  1. 1What's a higher order function ?
    1. AA function that takes another function as argument
    2. BA function that returns a function
    3. CAny of the above two
    4. DNone of above
  2. 2Which of the following is most adapted for parallel processing ?
    1. AAkka Actors
    2. BScala Futures
    3. CScala Options
    4. DScala Either
  3. 3val result = for {
    x <- Future(20)
    y <- Future(10) if y > 10
    } yield x + y

    what's the value of result ?
    1. ASuccess(30)
    2. B30
    3. CFailure
  4. 4Which one is FALSE about an actor akka ?
    1. ACan communicate with an actor using tell function
    2. BCan communicate with an actor using ask pattern
    3. CMessages can be passed to an actor using ActorRef handle of that actor
    4. DMessages can be passed to an actor using Actor instance of that actor
  5. 5A monad is a functor which also has a flatMap ?
    1. ARichtig
    2. BFalsch
  6. 6What's NOT true about a type class in scala ?
    1. AIt enables ad hoc polymorphism
    2. BIt uses implicts, implicitly and bound context syntax
    3. CAddition of a new functionality in type class can be done without any changes to the original code
    4. DType class is an abstract class
  7. 7SBT performs incremental recompilations ?
    1. ARichtig
    2. BFalsch
  8. 8val mySeq = Seq("Hello world", "Hello how are you", "Are you well", "Hello guys")
    val result = mySeq.flatMap(_.split(" ")).map(_.length).filter(v => v < 4).reduce(_ + _)

    What's result ?
    1. A28
    2. B43
    3. C15
    4. DNone of the above
  9. 9trait F[-A] {
    }

    What does -A represent ?
    1. ACovariant type parameter
    2. BContravariant type parameter
    3. CLower bound
    4. DUpper bound
  10. 10Choose right responses for a partial function (multiple responses possible)
    1. AA PartialFunction must provide a method isDefinedAt
    2. BA PartialFunction must provide a method apply
    3. CCan be lifted to a normal function with return type wrapped in an option
    4. DAkka actor's receive method is not an example of partial function

Informationen

Beschreibung
This is the 2nd quiz for Scala.IO
Sprache
English
Aufrufe
73
Bewertung
Noch keine Bewertungen
Bewerte dieses Quiz
Bewerte dieses Quiz

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck