hof.glisp 209 B

12345678
  1. (defn add3 [a] (+ a 3))
  2. (assert (= '(4 5 6) (map add3 '(1 2 3))))
  3. (assert (= [4 5 6] (map add3 [1 2 3])))
  4. (assert (= (apply (fn [a b] (* 2 a b)) [1 2]) 4))
  5. (assert (= (apply (fn [a b] (* 2 a b)) '(1 2)) 4))