quox/lib/Quox/BoolExtra.idr

13 lines
246 B
Idris
Raw Normal View History

2023-02-21 23:42:56 -05:00
module Quox.BoolExtra
import public Data.Bool
2024-05-05 13:41:06 -04:00
export infixr 5 `andM`
export 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