p-seq
: Receives two integer arguments, “from” and “to”, and this method should return a sequence containing only the numbers given by is-p
function between “from” and “to”. The current code that I have written only prints out all the numbers between "from" and "to". I want p-seq to return a sequence.
is-p
: checks and returns true if a number is a prime number otherwise returns false.
(defn p-seq [from to]
(loop [count from]
(if (> count to)
(println "")
(do
(def seqf (is-p count))
(if(= seqf true)
(print count " ")
)
(recur (inc count))))))
Any help appreciated. Thank you.