” in clojure”
Write a procedure, (my-max p v1 …), of two or more arguments.Include unit tests. The first argument
will be a predicate, p, indicating a “greater than” relationship.my-max must return the largest of its subsequent
arguments according to p. In the event of a tie (a <= b and b<= a so a = b) my-max must return the first
occurrence of the largest value. Sample runs:
> (my-max > 9 1 2 3 17 7 9)
17
> (my-max
(fn [s1 s2] (> (count s1) (count s2)))
“Hello” “Goodbye” “Frog” “Cat” “Dog” “Eybdoog”))
“Goodbye”
Expert Answer
An answer will be send to you shortly. . .
PayPal Gateway not configured
PayPal Gateway not configured