Created
November 5, 2014 14:44
-
-
Save Duta/db470cc02ea73e3a44cf to your computer and use it in GitHub Desktop.
This file contains 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
english :: BoardSpec | |
english = [ ((x, y), not $ all (==3) [x,y]) | |
| x <- [0..6] | |
, y <- [0..6] | |
, (x,y) `notElem` [ (x',y') | |
| let xs = [0,1,5,6] | |
, x' <- xs | |
, y' <- xs | |
] | |
] | |
european :: BoardSpec | |
european = [ ((x, y), not $ all (==3) [x,y]) | |
| x <- [0..6] | |
, y <- [0..6] | |
, (x,y) `notElem` [ (0,0),(0,1),(1,0) | |
, (6,6),(5,6),(6,5) | |
, (0,5),(0,6),(1,6) | |
, (5,0),(6,0),(6,1) | |
] | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very nice! Actually taught me a bit just by looking at this. Here's what you were probably looking for in that last one.