Functional Programming

Functional programming is a restriction on how we write programs, not on what programs we can express.


Side Effects

A function has a side effect if it does something other than simply return a result, for example:

  • Modifying a variable
  • Modifying a data structure in place
  • Setting a field on an object
  • Throwing an exception or halting with an error
  • Printing to the console or reading user input
  • Reading from or writing to a file
  • Drawing on the screen

results matching ""

    No results matching ""