Quiz
Scala Quiz - 2
Dieses Quiz hat ein Zeitlimit und öffnet sich deshalb im gewohnten Player.
Fragen in diesem Quiz (10)
1What's a higher order function ?
- AA function that takes another function as argument
- BA function that returns a function
- CAny of the above two
- DNone of above
2Which of the following is most adapted for parallel processing ?
- AAkka Actors
- BScala Futures
- CScala Options
- DScala Either
3val result = for {
x <- Future(20)
y <- Future(10) if y > 10
} yield x + y
what's the value of result ?- ASuccess(30)
- B30
- CFailure
4Which one is FALSE about an actor akka ?
- ACan communicate with an actor using tell function
- BCan communicate with an actor using ask pattern
- CMessages can be passed to an actor using ActorRef handle of that actor
- DMessages can be passed to an actor using Actor instance of that actor
5A monad is a functor which also has a flatMap ?
- ARichtig
- BFalsch
6What's NOT true about a type class in scala ?
- AIt enables ad hoc polymorphism
- BIt uses implicts, implicitly and bound context syntax
- CAddition of a new functionality in type class can be done without any changes to the original code
- DType class is an abstract class
7SBT performs incremental recompilations ?
- ARichtig
- BFalsch
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 ?- A28
- B43
- C15
- DNone of the above
9trait F[-A] {
}
What does -A represent ?- ACovariant type parameter
- BContravariant type parameter
- CLower bound
- DUpper bound
10Choose right responses for a partial function (multiple responses possible)
- AA PartialFunction must provide a method isDefinedAt
- BA PartialFunction must provide a method apply
- CCan be lifted to a normal function with return type wrapped in an option
- DAkka actor's receive method is not an example of partial function
Informationen
- Beschreibung
- This is the 2nd quiz for Scala.IO
- Autor
- himanshu arora
- Sprache
- English
- Aufrufe
- 73
- Schlagwörter
- Bewertung
- Noch keine Bewertungen Bewerte dieses Quiz