AFP Midtvejsevaluering
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
Henrik Kirk
Used 1+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Result of:
[-2;3;5] |> List.map (fun x -> x*2)
val it : int list = [-4; 6; 10]
val it : float list = [-4.0; 6.0; 10.0]
error FS0001: The type 'float' does not match the type 'int'
val it: int list = []
Answer explanation
Map transforms input type to output type of same shape
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
F# is
General purpose language with roots in FP
Functional first language with strong types, support imperative, FP and OOP
Purely functional with strong types
General purpose language with support of OOP and FP
Answer explanation
F# is functional first language in the ML language family. But offers OOP programming and can even be used to web, devops and much more
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which is the higher order function(s) in F#
'a -> int -> 'b -> float option list
'a -> 'b -> ('c -> int)
('a -> int) -> 'c
('a -> int) -> ('b -> 'c) -> ('d -> float)
Answer explanation
Functions that return a function or take other functions as paremeter
4.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
F# is lazy evaluated
True
False
Some
None
Answer explanation
F# is eagerly evaluated - Haskell is lazyly.
5.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which is the polymorphic function(s) in F#
(int -> float) -> int option -> float option
int -> int list
('a -> 'b) -> 'a -> 'b
int -> 'a list
Answer explanation
Polymorphic is also present in FP - sinze its just a way to state multiple forms.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Type of:
[1;2;3;4] |> List.fold (fun a b -> a + string b) ""
val it : string list
val it : string
val it : int
val it : int list
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Result of:
[1;2;3;4] |> List.fold (fun a b -> string (int a + b)) "0"
"0"
"10"
"11"
"1234"
Answer explanation
Type name is a function that converts to that type eg 'int' and 'string'
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
11 questions
NHÓM 3: XÁC ĐỊNH DỰ ÁN
Quiz
•
University
10 questions
Algorithm analysis: divide & conquer theory
Quiz
•
University
10 questions
Soal SKD
Quiz
•
University - Professi...
15 questions
AV1/R1 2TEC_PM_1 A 11_História e Reconhecimento da UX
Quiz
•
1st Grade - University
12 questions
Porcentajes
Quiz
•
University
13 questions
L1 - Computer Networks
Quiz
•
University
15 questions
4.6.4 Logic Gates
Quiz
•
10th Grade - Professi...
10 questions
Web-II-Loop and Function
Quiz
•
University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
9 questions
Principles of the United States Constitution
Interactive video
•
University
18 questions
Realidades 2 2A reflexivos
Quiz
•
7th Grade - University
10 questions
Dichotomous Key
Quiz
•
KG - University
25 questions
Integer Operations
Quiz
•
KG - University
7 questions
What Is Narrative Writing?
Interactive video
•
4th Grade - University
20 questions
SER vs ESTAR
Quiz
•
7th Grade - University
