quox/lib/Quox/BoolExtra.idr

13 lines
232 B
Idris
Raw Normal View History

2023-02-21 23:42:56 -05:00
module Quox.BoolExtra
import public Data.Bool
2023-03-03 06:19:15 -05:00
infixr 5 `andM`
infixr 4 `orM`
2023-02-21 23:42:56 -05:00
public export
2023-03-03 06:19:15 -05:00
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