[ create a new paste ] login | about

Link: http://codepad.org/8dfzxain    [ raw code | fork ]

Plain Text, pasted on Feb 8:
1
2
3
4
5
6
7
8
9
10
11
12
(defn is-odd [x]
    (= (mod (int x) 2) 1))


(defn meets-rules 
    "Did this number meet the rules for our test"
    [x] 
    (and (and (and 
    (is-odd (.substring (str x) 0 1))
    (is-odd (.substring (str x) 1 2))
    (is-odd (.substring (str x) 2 3))))))



Create a new paste based on this one


Comments: