i have this two functions and i use share-card-to-player in share-cards. Should i not rather pass share-card-to-player as argument or use it as anonymous function?
In the way, i am using it, i doubt, that i am using it in a functional way, because i am basically referencing to a global variable namely the function share-card-to-player. Is that assumption correct?
(defn share-card-to-player [game [player cards]]
(assoc-in game [:players player :cards ]
cards))
(defn share-cards [{players :players cards :cards :as game}]
(reduce share-card-to-player game
(map vector
(keys players)
(->> cards
(partition (/ (count cards)
(count players)))))))