Examples of functional languages are:
Principles:
- Many functional languages have their foundations in lambda calculus as described on this page.
- Functions are first class values (like integers, strings, etc) they can be stored as variables, passed and returned as values to other functions etc.
- To be 'purely functional' a function should be like a mathematical function in that, given the same inputs, it should have no side effects, like Input/Output or reading/writing global values. Some exections to this are requred as a program without input or output would not be very useful.
- Variables tend to be non-mutable.
Scala
On this page we discuss 'scala' which combines functional and object oriented programming.