Skip to content

Instantly share code, notes, and snippets.

@kineticz
Created January 24, 2015 19:38
Show Gist options
  • Select an option

  • Save kineticz/8114727bdbb2dff39f4f to your computer and use it in GitHub Desktop.

Select an option

Save kineticz/8114727bdbb2dff39f4f to your computer and use it in GitHub Desktop.
Using -> where there is no pipe line
(defmulti process-input
(fn [game input]
(:kind (last (:uis game)))))
(defmethod process-input :start [game input]
(-> game
(assoc :world (random-world))
(assoc :uis [(new UI :play)])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment