mirror of
https://github.com/richardharrington/robotwar.git
synced 2024-05-28 23:41:31 +00:00
refactors get-programs using threading operator
This commit is contained in:
parent
5893e4b5e6
commit
ca7b2dfb4b
|
@ -23,7 +23,10 @@
|
||||||
(defn get-programs
|
(defn get-programs
|
||||||
"gets a sequence of five programs from the source-code repository."
|
"gets a sequence of five programs from the source-code repository."
|
||||||
[program-keys]
|
[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
|
(defn add-game
|
||||||
"a function to update the games-store atom state.
|
"a function to update the games-store atom state.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user