Skip to content

Instantly share code, notes, and snippets.

@samflores
Last active August 29, 2015 14:05
Show Gist options
  • Save samflores/2c68a9bcb6b4742d6760 to your computer and use it in GitHub Desktop.
Save samflores/2c68a9bcb6b4742d6760 to your computer and use it in GitHub Desktop.
;; 1: normal funtion calls
(attach-events (display-board! (create-board 10)))
;; 1.5: added by popular demand :p
(attach-events
(display-board!
(create-board 10)))
;; 2: "chain"
(-> 10
create-board
display-board!
attach-events)
;; 3: for some reason I don't think "10" is the start of the chain, the created board is.
(-> (create-board 10)
display-board!
attach-events)
;; 4: overkill?
(let [run-game (comp attach-events display-board! create-board)]
(run-game 10))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment