Clojure Flashcards

1
Q

Unlike most Lisp systems, Clojure doesn’t use its own custom virtual machine. It was originally designed to compile to code that would run on the ANSWER.

A

JVM

Java Virtual Machine

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The main programming paradigm for Clojure is ANSWER programming.

A

functional

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The loop and recur constructs are in Clojure to guide ANSWER.

A

tail recursion optimization

tail recursion elimination

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In Clojure, the value of (repeat 1) is ANSWER.

A

an infinite sequence of 1s

a lazy infinite sequence of 1s

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

In Clojure, (take 3 (iterate (fn [x] (* 2 x)) 2)) produces ANSWER.

A

(4 8 16)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The main Clojure approach to concurrency is called ANSWER.

A

Software Transactional Memory

STM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In Clojure, ANSWER is a concurrency construct that allows an asynchronous return before computation is complete.

A

a future

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

In Clojure, you cannot change a reference outside of ANSWER,

A

a transaction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly