quox/lib/Quox/BoolExtra.idr
2023-02-22 05:42:56 +01:00

12 lines
234 B
Idris

module Quox.BoolExtra
import public Data.Bool
infixr 5 <&&>
infixr 4 <||>
public export
(<&&>), (<||>) : Monad m => m Bool -> m Bool -> m Bool
a <&&> b = if !a then b else pure False
a <||> b = if not !a then b else pure True