First clojure examples and Lab 1

Due Friday, February 3rd at 11:59pm

Problem 1 (12 points)

Usde map, reduce, filter, and similar functions and anonymous functions to compute the following:

Problem 2 (6 points)

Write a reverse_list function: a function that takes a sequence and returns a sequence with all the same elements, but in the opposite order.

If your function is not using reduce already, write another function that does (and behaves the same way).

Problem 3 (3 points)

Write a function that is similar to every-other in the in-class examples, but keeps even-numbered elements instead of odd-numbered ones, i.e. produces [2, 4, 9] given the list [1 2 3 4 5 9].


UMM CSci 4651