Domanda di colloquio di Apple

How would you implement the shell command cd?