I am doing a Divides?
function that takes as inputs a divisor x and a number n. The function should return true if x divides n and false otherwise.
at the moment this function works fine but I need to twist it a little bit more by adding an anonymous function with filter method, and also for the arguments have to be in the correct order (x n)
rather than (n x)
.
Any ideas would be appreciated:
Divides?:
(defn Divides? [x n]
(zero? (mod n x)))
(println "Divides"( Divides? 2 10))
//output : true