Last active
October 15, 2015 00:27
-
-
Save parsonsmatt/2632bea0c4b7da38eac9 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
allDifferent :: Ord d => [ID] -> Constraints d | |
allDifferent ids = do | |
domains <- forM ids (use . domainAt) | |
let unified = mconcat domains | |
newDomains = map (\d -> d \\ (unified \\ d)) domains | |
zipWithM_ updateVariable ids newDomains |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment