Quiz
- Is Clojure a pure functional programming language?
a) Yes, it's a pure functional programming.
b) No, it's a functional programming language but not a pure one because it allows state changes.
c) No, but Clojure is a pure OOP language.
d) No, Clojure is not a functional programming language.
- Will this code run in the Clojure REPL?
(10)
a) Yes, this is valid code. It will return 10.
b) No, the last entry in the list must be a function.
c) No, this will not run because the first element in the list is not a function.
d) None of the preceding options.
- What is the default type that Clojure uses for whole numbers if it can fit in the data type?
a) Primitive long value.
b) The java.lang.Long
wrapper class instance.
c) Primitive integer value.
d) The java.lang.Integer
wrapper class instance.
- What is the printed output of the following program?
(println + 25 25)
a) It prints 50
.
b) It prints a reference to the +
function, followed by "25 25"
.
c) An exception is thrown.
d) None of the preceding options...