Zusammenfassung der Ressource
Frage 1
Frage
What is NOT necessarily a property of a monoid ?
Antworten
-
Associativity
-
Identity
-
Functions map & flatMap
-
Closure
Frage 2
Frage
SBT can execute tasks in parallel ?
Frage 3
Frage
What is the LEAST true statement for an actor akka ?
Antworten
-
Communicates using messages
-
Used for concurrency management
-
Asynchronous and non-blocking
-
Used for parallel programming
Frage 4
Frage
Future.successful(10)
Future.successful(20)
The above mentioned 2 futures run on two different threads ?
Frage 5
Frage
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 ?
Antworten
-
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)
Frage 6
Frage
case class People(name: String, age: Int)
val people1 = People("Jon", 30)
val people2 = People("Jon", 30)
people1 == people2 ?
Frage 7
Frage
A FUNCTOR must have ?
Antworten
-
map function
-
flatMap function
-
map and flatMap both
-
none of the above
Frage 8
Frage
trait F[+A] {
def {...}
}
What does +A represent ?
Frage 9
Antworten
-
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
Frage 10
Frage
Which of the following statements about a scala Either are true (multiple responses possible) ?
Antworten
-
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