Skip to content

Commit 28b5d02

Browse files
authored
Create 25.clj
1 parent 91ec757 commit 28b5d02

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

25.clj

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
;; Title: Find the odd numbers
2+
;; Link: http://www.4clojure.com/problem/25
3+
;; Description: Write a function which returns only the odd numbers from a sequence.
4+
5+
;; QUESTION/TEST CODE
6+
7+
(= (__ #{1 2 3 4 5}) '(1 3 5))
8+
(= (__ [4 2 1 6]) '(1))
9+
(= (__ [2 2 4 6]) '())
10+
(= (__ [1 1 1 3]) '(1 1 1 3))
11+
12+
;; SOLUTION CODE
13+
14+
#(filter odd? %)

0 commit comments

Comments
 (0)