Implementing stack.c