Skip to content

Instantly share code, notes, and snippets.

@tmountain
Created November 29, 2017 19:05
Show Gist options
  • Save tmountain/1ef64bd28c3a587310191bf55c3428c5 to your computer and use it in GitHub Desktop.
Save tmountain/1ef64bd28c3a587310191bf55c3428c5 to your computer and use it in GitHub Desktop.
module Main where
import Set
import Text.Pretty.Simple (pPrint)
c1 = Card { shape = Pill, color = Red, shade = Clear, count = One }
c2 = Card { shape = Squiggle, color = Purple, shade = Clear, count = Two }
c3 = Card { shape = Diamond, color = Green, shade = Clear, count = Three }
c4 = Card { shape = Squiggle, color = Purple, shade = Solid, count = Two }
c5 = Card { shape = Diamond, color = Green, shade = Solid, count = One }
c6 = Card { shape = Squiggle, color = Purple, shade = Clear, count = Three }
c7 = Card { shape = Pill, color = Red, shade = Lined, count = Two }
c8 = Card { shape = Pill, color = Purple, shade = Lined, count = Three }
c9 = Card { shape = Diamond, color = Purple, shade = Solid, count = Two }
c10 = Card { shape = Pill, color = Purple, shade = Clear, count = One }
c11 = Card { shape = Squiggle, color = Purple, shade = Lined, count = Three }
c12 = Card { shape = Diamond, color = Purple, shade = Clear, count = One }
masterSet = [ c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12 ]
main :: IO ()
main = pPrint $ findSets masterSet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment