AQA 7517 4.12.1.3: Function application
The free BugBot lessons that teach this point, a robot to try it on, and the past-paper questions that test it.
What it covers
At GCSE a function was a named block of code that could return a value. Functional programming takes its idea of a function from maths, where a function is defined by what it maps to what, and every function has a type that says which values can go in and which can come out. This lesson gives you the vocabulary exam questions use: function type, domain, co-domain and function application.
- A function is a mapping
- Function type, domain and co-domain
- Writing the type in code
- Function application
- Applying a type to the robot
Or do it in the simulator, with tasks that mark themselves
Lessons that teach it
- A13.2 Function types and function application Functional programming
Functions as mappings, function type f: A to B, domain and co-domain, and function application with arguments from a Cartesian product. - A13.8 Project: the way out Functional programming
Sweep the bay, decide with a pipeline of pure functions built by composition, map, filter and fold, then drive out.
Try it on a robot
The task from A13.2 Function types and function application, running here. Change the program and press Run.
The specification is AQA's own document; this page says which of our lessons teach point 4.12.1.3 and is not endorsed by the board.