Skip to content

Instantly share code, notes, and snippets.

Created June 14, 2011 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/1025258 to your computer and use it in GitHub Desktop.
Save anonymous/1025258 to your computer and use it in GitHub Desktop.
;; youz's solution to Analyze a Tic-Tac-Toe Board
;; https://4clojure.com/problem/73
;;; inspired by https://gist.github.com/1024984
(fn [a x b]
(#{:o :x}
(ffirst
(filter #(a = %)
`(~@b ~@(a map list b) ~(x b [0 1 2]) ~(x b [2 1 0]))))))
apply #(map get % %2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment