import Memory
import Thought

import Control.Arrow
import Data.Monoid
import Test.QuickCheck

addAnyNum :: Integer -> Integer -> Bool
addAnyNum n s = appEndo (runMemory (update (n +)) s ()) s == s+n

thinkHoldsState :: Integer -> Integer -> Bool
thinkHoldsState n s = fst (stepThought (arr (+ n)) s) == s+n

main :: IO ()
main = do
    quickCheck addAnyNum
    quickCheck thinkHoldsState
