(fn winner [ccol]
(letfn [(line [ccol]
(some
#(cond
(apply = :x %1) :x
(apply = :o %1) :o
:else nil)
ccol))
]
(line (concat
ccol
(apply map #(vec %&) ccol)
[[(-> ccol first first)
(-> ccol second second)
(-> ccol last last)]
[(-> ccol first last)
(-> ccol second second)
(-> ccol last first)]]))))
转载于:https://my.oschina.net/diqye/blog/524018