Skip to content

Instantly share code, notes, and snippets.

@bpsm
Created August 25, 2010 12:34
Show Gist options
  • Save bpsm/549408 to your computer and use it in GitHub Desktop.
Save bpsm/549408 to your computer and use it in GitHub Desktop.
(ns people)
(defrecord Person [name age])
(def persons [(Person. "Boris" 40)
(Person. "Betty" 32)
(Person. "Bambi" 17)])
(def minor? #(-> % :age (<= 18)))
(defn main []
(doseq [ff [filter remove]]
(->> persons (ff minor?) (map :name) (interpose ", ") (apply str) println)))
;; see also:
;; http://michid.wordpress.com/2010/08/24/so-scala-is-too-complex/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment