Functional programming is a declarative programming paradigm that organizes code into functionsâ€”pure computations as opposed to proceduresâ€”and the adaptations of those functions as values. Functional programming has its origin in mathematical functions. Immutability helps to take a mathematical approach and create pure functions.