In-class exercise with a stack-based language