cryptonite/Crypto/PubKey/Internal.hs
Vincent Hanquez b1e222cf3d merge crypto-pubkey-types and crypto-pubkey
adapt CPRG to MonadRandom
2015-04-03 07:33:16 +01:00

25 lines
525 B
Haskell

-- |
-- Module : Crypto.PubKey.Internal
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : Good
--
module Crypto.PubKey.Internal
( and'
, (&&!)
) where
import Data.List (foldl')
-- | This is a strict version of and
and' :: [Bool] -> Bool
and' l = foldl' (&&!) True l
-- | This is a strict version of &&.
(&&!) :: Bool -> Bool -> Bool
True &&! True = True
True &&! False = False
False &&! True = False
False &&! False = False