Oakam Interview Question

Write a function on a whiteboard.