openskills.info
Course Preview

Functional Programming

Functional programming is a way of building software from pure functions and immutable data instead of mutable state. It makes programs easier to reason about and test, and it powers languages from Haskell to the functional features of JavaScript and Python.

itSoftware engineering

Functional Programming

Functional programming is a programming paradigm in which you build programs by applying and composing functions that map values to other values, rather than by running a sequence of statements that update the program's state. The formal foundation of the style is the lambda calculus, developed in the 1930s by Alonzo Church as a model of computation built from function application.

Core ideas

Five ideas shape functional programming:

  • Pure functions always return the same result for the same arguments and perform no side effects. A pure function cannot be affected by mutable state, the clock, or user input.
  • Referential transparency lets you replace an expression with its value anywhere without changing program behavior. That property is what makes pure code testable and safe to reason about.
  • Immutable data is never modified in place. A transformation builds a new value from the old one, which removes an entire class of aliasing bugs.
  • First-class functions are values like any other: you can store them, pass them as arguments, and return them from other functions.
  • Recursion replaces loops. Repeated work is expressed as a function that calls itself, and common recursion patterns are abstracted into higher-order functions such as map, filter, and fold.

Not every functional language adopts every idea. A language can be pure or impure, strict or lazy, and statically or dynamically typed.

Continue the course

This section is part of the paid course.

See pricing to subscribe, or log in if you already have access.

Where this skill leads

Relevant careers

See how this topic contributes to broader role-level skill maps.

Sources

  • https://en.wikipedia.org/wiki/Functional_programming
  • https://en.wikipedia.org/wiki/Lisp_(programming_language)
  • https://en.wikipedia.org/wiki/ML_(programming_language)
  • https://en.wikipedia.org/wiki/Scheme_(programming_language)
  • https://en.wikipedia.org/wiki/Miranda_(programming_language)
  • https://en.wikipedia.org/wiki/Haskell_(programming_language)
  • https://en.wikipedia.org/wiki/John_Backus
  • https://en.wikipedia.org/wiki/Erlang_(programming_language)
  • https://en.wikipedia.org/wiki/Scala_(programming_language)
  • https://en.wikipedia.org/wiki/F_Sharp_(programming_language)
  • https://en.wikipedia.org/wiki/Clojure
  • https://en.wikipedia.org/wiki/OCaml
  • https://en.wikipedia.org/wiki/Elm_(programming_language)
  • https://plato.stanford.edu/entries/lambda-calculus/
  • https://www.cse.chalmers.se/~rjmh/Papers/whyfp.html
  • https://www.haskell.org/
  • https://www.haskell.org/get-started/
  • https://www.haskell.org/tutorial/
  • https://www.haskell.org/onlinereport/haskell2010/
  • https://htdp.org/
  • https://clojure.org/about/history
  • https://elixir-lang.org/
  • https://elixir-lang.org/blog/2014/09/18/elixir-v1-0-0-released/
  • https://www.erlang.org/
  • https://www.scala-lang.org/
  • https://fsharp.org/
  • https://ocaml.org/
  • https://elm-lang.org/
  • https://www.purescript.org/
  • https://racket-lang.org/
  • https://github.com/sindresorhus/awesome
  • https://github.com/lucasviola/awesome-functional-programming
  • https://github.com/hemanth/functional-programming-jargon
  • https://github.com/timoxley/functional-javascript-workshop
  • http://lambda-the-ultimate.org/
  • https://www.schoolofhaskell.com/
  • https://www.cl.cam.ac.uk/research/hvg/Isabelle/
  • https://github.com/idris-hackers/idris-koans
  • https://www.youtube.com/playlist?list=PLTA0Ta9Qyspa5Nayx0VCHj5AHQJqp1clD
  • https://www.youtube.com/watch?v=6COvD8oynmI
  • https://www.manning.com/books/functional-programming-in-scala-second-edition
  • https://www.manning.com/books/grokking-simplicity
  • https://gcanti.github.io/fp-ts/
  • https://arrow-kt.io/