refactors get-programs using threading operator

This commit is contained in:
Richard Harrington 2014-10-12 11:26:48 -04:00
parent 5893e4b5e6
commit ca7b2dfb4b

View File

@ -23,7 +23,10 @@
(defn get-programs
"gets a sequence of five programs from the source-code repository."
[program-keys]
(take 5 (filter identity (map #(% source-programs/programs) program-keys))))
(->> program-keys
(map source-programs/programs)
(remove nil?)
(take 5)))
(defn add-game
"a function to update the games-store atom state.