
functional quiz 1.2
Authored by Azamat Leskhan
Computers
University
Used 80+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
18 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is pattern matching?
a functionality that checks if a objects is an examplar of some particular class
tool that makes reccursion easier
alternative to if-else expressions
a technique where you test an expression to determine if it has certain characteristics
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a case class?
classes that cannot have fields
implementatoin of the inheritance concept in Scala programming language
classes that are required to inherite a class or implement an interface
immutable classes that can be decomposed via pattern matching
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why generics are important?
They generilize type that is used inside of a class
generalization of several modules that work similarly
generlization of a group of functions
?
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
During pattern matching, possible case classes are determined in compile time
true
false
neither
both
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a function of a map function?
Transform every member of collection in accordance to a function provided
Square every element in a list
check if element in a list
higher order function that create all possible combinations of elements in a list
function that create an object that describes collection of key-value pairs
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a correct implementation of a map function for class below:
class Example[A, B, C](a: A, b: B, c: C)
.
def map(f: (A, B, C) => Example[A, B, C]): Example[A, B, C] = f(a, b, c)
def map[D](f: (A, B, C) => D): D = f(a, b, c)
def map[D](f: (A, B, C) => D, g: A => A, h: B => B, k: C => C): D = f(g(a), h(b), k(c))
true
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the functions below can be used to implement a sum of a list?
filter
map
reduce
adjoin
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
18 questions
Memory-Mobo-Hard/Software
Quiz
•
University
14 questions
Linux: Users and Groups
Quiz
•
9th Grade - University
20 questions
PARC Linux Basic Part 2
Quiz
•
University
20 questions
CSS Pseudo dan CSS Grid System
Quiz
•
University
18 questions
SQL Quiz
Quiz
•
University
20 questions
1ºDAM/DAW - Entornos de Desarrollo - UD1-6 - Prof. C. Boni
Quiz
•
University - Professi...
14 questions
BÀI 14- THUẬT TOÁN TÌM KIẾM TUẦN TỰ
Quiz
•
6th Grade - University
15 questions
After Effect Intoduction
Quiz
•
10th Grade - University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade