In fact, you do not even need one of these functions to write the client program described below.
Entry of the string qnpn represents the Pile: quarter, nickel, penny, nickel in which the quarter is on top of the Pile and the second nickel at the bottom.