Last active
March 12, 2017 18:30
-
-
Save deque-blog/2d30176f9e98c4c0b2dbaaae3969f570 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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