logo

Study resource

Writing functional programs common mistakes

Study Writing functional programs with curriculum-aligned Common Mistakes resources, practice links, and exam-focused support.

At a glance

common mistakes

Resource type

Topic

Writing functional programs

AqaA LevelComputer ScienceFundamentals of functional programming

Common mistakes

  • Confusing map and filter

    Using map when the task is to keep only elements satisfying a condition, or using filter when every element needs to be transformed.

    Fix itUse filter for selection based on a condition and map for applying a function to every element. If both are needed, apply them as separate stages in an appropriate order.