add more exercise

This commit is contained in:
Marshall Shen 2013-07-26 20:34:21 -05:00
parent f0bdefe972
commit 36b98d0120
2 changed files with 4 additions and 0 deletions

View file

@ -83,6 +83,7 @@
() ()
[:anything :goes :here] [:anything :goes :here]
(< x 31) (< x 31)
[2 4 6 8]
(* 10 x) (< x 4) (* 10 x) (< x 4)
24 24
100 100

View file

@ -17,6 +17,9 @@
"Or somewhere in between" "Or somewhere in between"
(= [10 20 30] (filter (fn [x] __) [10 20 30 40 50 60 70 80])) (= [10 20 30] (filter (fn [x] __) [10 20 30 40 50 60 70 80]))
"It all depends on what you want, you can also use a prefined function"
(= __ (filter even? [1 2 3 4 5 6 7 8]))
"Maps and filters may be combined" "Maps and filters may be combined"
(= [10 20 30] (map (fn [x] __) (filter (fn [x] __) [1 2 3 4 5 6 7 8]))) (= [10 20 30] (map (fn [x] __) (filter (fn [x] __) [1 2 3 4 5 6 7 8])))