17. Patterns, functions & algebra