Skip to content

Commit

Permalink
Mire: use shorthand for anonymous functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Pauley committed May 26, 2010
1 parent 83ebd6b commit a62d254
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions PeepCode/Clojure/mire/src/mire/commands.clj
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -46,16 +46,15 @@


(def commands (def commands
{:move move, {:move move,
:north (fn [] (move :north)), :north #(move :north),
:east (fn [] (move :east)), :east #(move :east),
:south (fn [] (move :south)), :south #(move :south),
:west (fn [] (move :west)), :west #(move :west),
:look look, :look look,
:grab grab, :grab grab,
:discard discard, :discard discard,
:inventory inventory, :inventory inventory,
:wtf (fn [] :wtf #(str "You need help.")})
"Yeah sure, I'll do that right after you grow a brain.")})


(defn execute (defn execute
"Execute a command passed from the client" "Execute a command passed from the client"
Expand Down

0 comments on commit a62d254

Please sign in to comment.