{-# LANGUAGE TemplateHaskell #-}
module McCarthy91 where

import Test.QuickCheck
import Test.QuickCheck.All

--------------------------------------------------------------------------------

m :: Integer -> Integer
m n | n > 100   = n-10
    | otherwise = m (m (n+11))

--------------------------------------------------------------------------------

prop_M1 n =
  n <= 100 ==> m n == 91

prop_M2 n =
  n >= 101 ==> m n == n-10

--------------------------------------------------------------------------------

return []
testAll = $(quickCheckAll)

--------------------------------------------------------------------------------

