Skip to content

Instantly share code, notes, and snippets.

@reinh
Created January 16, 2014 06:31
Show Gist options
  • Save reinh/8450668 to your computer and use it in GitHub Desktop.
Save reinh/8450668 to your computer and use it in GitHub Desktop.
nexts :: Game -> [Game]
nexts game
| isNothing (result game) = mapMaybe (update game) allMoves
| otherwise = []
type GameTree = Cofree [] Game
gameTree :: Game -> GameTree
gameTree = coiter nexts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment