class StackObject a b where (>>) :: forall c. => a -> b -> c instance StackObject () Integer where () >> n = n instance StackObject Integer (Integer -> Integer -> Integer) where n >> f = f n instance StackObject (Integer -> Integer) -> Integer where f >> n = f n