Created
November 30, 2019 23:58
-
-
Save ShahOdin/35a37e001f3ecc9f988dacb5bae8360f to your computer and use it in GitHub Desktop.
clojure attempt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn is_divisible [n m] (= (mod n m) 0)) | |
(defn is_prime[n] | |
(every? | |
#(not (is_divisible n %)) | |
(range 2 (- n 1)))) | |
(take-last 3 (filter is_prime (range 1 20))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Scala equivalent: