Monadic logic