Jane Street interview question

To make a stack machine