5.5. Some Basic Function Types

Types for the most basic stack functions are given below.

emptyStack :: Stack a
push :: Stack a -> a -> Stack a
pop :: Stack a -> (a, Stack a)
isEmpty :: Stack a -> Bool