Skip to content

Instantly share code, notes, and snippets.

@jbrechtel
Created November 20, 2012 14:51
Show Gist options
  • Select an option

  • Save jbrechtel/4118377 to your computer and use it in GitHub Desktop.

Select an option

Save jbrechtel/4118377 to your computer and use it in GitHub Desktop.
(def possible-states [:clean :dirty :wall])
(def state-permutations
(for [north possible-states,
south possible-states,
east possible-states,
west possible-states,
curr possible-states]
{:north north :south south :east east :west west :current curr}))
(def states (zipmap state-permutations (range (count state-permutations))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment