Skip to content

Instantly share code, notes, and snippets.

@cataska
Created October 13, 2018 12:00
Show Gist options
  • Save cataska/cbf86c536bbe492ca71616e5367f8d71 to your computer and use it in GitHub Desktop.
Save cataska/cbf86c536bbe492ca71616e5367f8d71 to your computer and use it in GitHub Desktop.
(def sum-str (comp str +))
;; => #'sum-str
(sum-str 8 8 8)
;; => "24"
(filter (comp not zero?) [0 1 0 2 0 3 0 4])
;; => (1 2 3 4)
(def countif (comp count filter))
;; => #'countif
(countif even? [2 3 1 5 4])
;; => 2
((comp second reverse) ["a" 2 7 "b"])
;; => 7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment