Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(defn fullhouse3 [hand]
(let [index (->> hand
(group-by :rank)
vals
(sort-by (fn [same] [(count same)
(:rank (first same))]
>)))
[fst snd] index]
(when (and (= (count fst) 3)
(>= (count snd) 2))
(concat fst (take 2 snd)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.