mirror of
https://github.com/richardharrington/robotwar.git
synced 2024-10-31 20:09:53 +00:00
refactors get-programs using threading operator
This commit is contained in:
parent
5893e4b5e6
commit
ca7b2dfb4b
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user