CIS 554 -- Clojure Quiz | Name
__________________________________ |
to return the third value in a list. You may assume that the list has at least three elements.neg
to return the first negative number in a list of numbers. You may assume that the list contains some negative numbers. N
, will return a list or sequence (either one) of the integers 1
through N
, inclusive. count-to
. Then use count-to
to write an expression whose value is a list of squares of the numbers 1
through 100
. That is, it returns [1 4 9 16 ... 10000]
.non-mult-3
with argument N
which returns true if N
is not a multiple of 3
. Reminder: Clojure has mod
and not
functions that you can use. 1
through 25
that are not multiples of 3
.ref
)? sum
to add up all the numbers in a list of numbers. Hint: Define sum
to have two parameters, and use one of them as an "accumulator."