Skip to content

Instantly share code, notes, and snippets.

@deque-blog

deque-blog/satSolver.hs

Last active Aug 26, 2017
Embed
What would you like to do?
sat :: SAT -> Bool
sat pb = or $ do
assignment <- forM (allVars pb) $ \var -> do
val <- [True, False]
pure (var, val)
pure (evalSat assignment pb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment