1/6
Looks like no tags are added yet.
What are the conditions that a variant must fulfill?
Non negative integer
Decrease on every recursive call, stay non negative
For which functions do we specify a variant and why?
Recursive functions and loops, to show that it always terminates
What is the difference between a conditional expression and a conditional statement?
Conditional expressions produces a value
Conditional statements decide which block of code to run (If else…)
What is the difference between a higher-order function and a function that is not higher-order?
Higher-order functions manipulate functions. It takes functions as parameters or return functions. A “normal” function doesn't take functions as parameters and doesn’t return functions.
What is the difference between a lambda expression and a "regular" function?
A regular function has a keyword and name. A lambda function only consists of parameters, a “=>” sign and an expression that automatically returns.
What is the scope of a variable?
The “domain” of the variable, the blocks in which the variable can be called in.
Explain one strategy for isolating a bug, e.g. to create a minimal test that reproduces it.
Cutting out all other lines except the ones that lead to the problem