Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(defn next-turn-gen
"Generator for a valid next turn from a previous valid turn"
[turn]
(gen/fmap
#(turn/next-turn turn %)
(gen/elements (vals (turn/transitions turn)))))
(gen/sample (next-turn-gen (turn/new-init-turn)) 1)
=> ;; Output not displayed since is a bit long
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment