This is a timed quiz.
You have 10 minutes to complete the 10 questions in this quiz.
What is NOT necessarily a property of a monoid ?
Associativity
Identity
Functions map & flatMap
Closure
SBT can execute tasks in parallel ?
What is the LEAST true statement for an actor akka ?
Communicates using messages
Used for concurrency management
Asynchronous and non-blocking
Used for parallel programming
Future.successful(10) Future.successful(20)
The above mentioned 2 futures run on two different threads ?
val mySeq = Seq("Hello world", "How are you doing", "See you soon") val mySeqMap = mySeq.map(_.split(" ")).filter(_.length > 3) val mySeqFlatMap = mySeq.flatMap(_.split(" ")).filter(_.length > 3)
What are the possible values of mySeqMap and mySeqFlatMap respectively ?
mySeqMap = List(How, are, you, doing) mySeqFlatMap = List(Hello, world, doing, soon)
mySeqMap = List(List(How, are, you, doing)) mySeqFlatMap = List(Hello, world, doing, soon)
mySeqMap = List(Hello, world, doing, soon) mySeqFlatMap = List(List(How, are, you, doing))
mySeqMap = List(List(How, are, you, doing)) mySeqFlatMap = List(Hello, world, doing, are, you, soon)
case class People(name: String, age: Int) val people1 = People("Jon", 30) val people2 = People("Jon", 30)
people1 == people2 ?
A FUNCTOR must have ?
map function
flatMap function
map and flatMap both
none of the above
trait F[+A] { def {...} }
What does +A represent ?
Upper bound
Contravariant type parameter
Covariant type parameter
Lower bound
What's a closure ?
A function whose return value depends upon a variable declared outside of that function
A function that takes another function as an argument
A function that returns a function as argument
A function that returns a future
Which of the following statements about a scala Either are true (multiple responses possible) ?
It has two subtypes Left and Right
Left represents success case and Right represents error case
Left represents error case and Right represents success case
Both Left and Right are case classes