Copyright | (c) roki 2019 |
---|---|
License | MIT |
Maintainer | falgon53@yahoo.co.jp |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe |
Language | Haskell2010 |
Utilities of boolean
Boolean methods
lor :: [a -> Bool] -> a -> Bool Source #
For mappings \(f_i:X\to B\) to an element \(x\in X\) of a set \(X\), \(\displaystyle\bigvee_{i} f_i(x)\) where \(B\) is the boolean domain.
This function will stop evaluation when the result of \(f_i(x)\) is True
(short circuit evaluation).
This is equivalent to:
f1 x || f2 x || f3 x == lor [f1, f2, f3] x
land :: [a -> Bool] -> a -> Bool Source #
For mappings \(f_i:X\to B\) to an element (xin X) of a set \(X\), \(\displaystyle\bigwedge_{i} f_i(x)\) where \(B\) is the boolean domain. This is equivalent to:
f1 x && f2 x && f3 x == land [f1, f2, f3] x
sop :: [a -> Bool] -> [a] -> Bool Source #
Sum of product form.
For mappings \(f_i:X\to B\) to an element \(x\in X\) of a set \(X\), \(\displaystyle\bigwedge_{j}\bigvee_{i} f_i(x_j)\) where \(B\) is the Boolean domain.
This function will stop evaluation when the result of \(f_i(x)\) is True
(short circuit evaluation).