quox/lib/Quox/BoolExtra.idr

13 lines
234 B
Idris
Raw Normal View History

2023-02-21 23:42:56 -05:00
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