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 Diff line number Diff line change
Expand Up @@ -46,16 +46,15 @@

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

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

0 comments on commit a62d254

Please sign in to comment.