AQA A-level Computer Science (7517)Specification point 4.12.1.2

AQA 7517 4.12.1.2: First-class object

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

A number can be stored in a variable, put in a list, passed to a function and returned from one. So far you have treated functions as something different: code you call. In a functional language, a function is a value like any other. This one idea is what makes the rest of the paradigm work.

  • First-class objects
  • Functions as arguments
  • Functions as results
  • Higher-order functions
  • A command table
Read the free lesson (20 min)

Or do it in the simulator, with tasks that mark themselves

Lessons that teach it

  1. A13.3 First-class objects and higher-order functions Functional programming
    Functions as values in variables, lists and dictionaries, passed as arguments and returned as results, lambdas, closures and a robot…
  2. 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.3 First-class objects and higher-order functions, 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.2 and is not endorsed by the board.