toysolver-0.0.5: Assorted decision procedures for SAT, Max-SAT, PB, MIP, etc

Portabilityportable
Stabilityprovisional
Maintainermasahiro.sakai@gmail.com
Safe HaskellSafe-Inferred

Util

Description

Some utility functions.

Synopsis

Documentation

combineMaybe :: (a -> a -> a) -> Maybe a -> Maybe a -> Maybe aSource

Combining two Maybe values using given function.

isInteger :: RealFrac a => a -> BoolSource

is the number integral?

    isInteger x = fromInteger (round x) == x

fracPart :: RealFrac a => a -> aSource

fractional part

   fracPart x = x - fromInteger (floor x)

revSequence :: Monad m => [m a] -> m [a]Source

revMapM :: Monad m => (a -> m b) -> [a] -> m [b]Source

revForM :: Monad m => [a] -> (a -> m b) -> m [b]Source