quox/lib/Quox/BoolExtra.idr
2024-05-27 21:29:37 +02:00

12 lines
246 B
Idris

module Quox.BoolExtra
import public Data.Bool
export infixr 5 `andM`
export infixr 4 `orM`
public export
andM, orM : Monad m => m Bool -> m Bool -> m Bool
andM a b = if !a then b else pure False
orM a b = if not !a then b else pure True