Scott Logic Interview Question

An easy one-or-two line coding problem