A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. Write simple, concise code that does not rely on any library functions. The code must start with ```{{language}} and end with ```.

USER: Write a {{language}} function {{Signature}} {{Input}} that returns {{Output}}.
ASSISTANT: