Skip to content

Functional Programming Practice Exam

Test yourself under real exam conditions: 50 timed questions, 60 on the clock, pass mark 70%%. Instant score with a full review of everything you got wrong. Free — no account needed.

📝 50 questions · ⏱ 60 minutes · 🎯 Pass mark 70% · 🆓 Free, no signup

Exam details

  • 50 questions drawn from 170 cards
  • Countdown timer — auto-submits when time runs out
  • Pass mark 70% (real certification threshold)
  • Full review of wrong answers at the end
  • No signup required — save your score with a free account

Sample Questions

5 shown

What is functional programming?

Show ▼

Functional programming is a declarative programming paradigm that treats computation as the evaluation of mathematical functions. It emphasizes immutability, pure functions, and avoiding side effects. Languages like Haskell, Erlang, Clojure, and F# are primarily functional.

What is a pure function?

Show ▼

A pure function is a function that:

  • Always returns the same output for the same input (deterministic)
  • Has no side effects — it doesn't modify external state, perform I/O, or depend on mutable data
Example: const add = (a, b) => a + b; is pure, while Math.random() is not.

What are side effects in functional programming?

Show ▼

Side effects are any observable changes a function makes beyond returning a value. Examples include:

  • Modifying a global or external variable
  • Writing to a file or database
  • Printing to the console
  • Making network requests
  • Mutating input arguments
FP aims to isolate side effects from core logic.

What is immutability?

Show ▼

Immutability means that once a data structure is created, it cannot be changed. Instead of modifying data, you create new copies with the desired changes. Benefits include:

  • Easier reasoning about code
  • Thread safety without locks
  • Simpler debugging and testing
Example: const newArr = [...arr, newItem]; instead of arr.push(newItem);

What are persistent data structures?

Show ▼

Persistent data structures always preserve previous versions of themselves when modified. They use structural sharing to efficiently reuse unchanged portions, avoiding full copies. Libraries like Immutable.js and languages like Clojure provide these. They enable O(log n) updates while maintaining immutability.

🎯 Take the Functional Programming Practice Exam