GitHub - HowProgrammingWorks/FunctionalProgramming: Functional Programming
Repository navigation
FunctionalProgrammingPublic
About
Functional Programming
www.youtube.com/TimurShemsedinovTopics
fp functional functional-programming functions javascript jsResources
Readme MIT license Activity Custom propertiesStars
11 starsWatchers
4 watchingForks
6 forks Report repositoryBranches
Tags
Go to Branches page Go to Tags page
Latest commit
History
24 Commits
View commit history for this file.
Folders and files
| Name | Name | Last commit message | Last commit date |
|---|---|---|---|
| JavaScript | JavaScript | ||
| .editorconfig | .editorconfig | ||
| .gitignore | .gitignore | ||
| LICENSE | LICENSE | ||
| README.md | README.md | ||
| eslint.config.js | eslint.config.js | ||
| package-lock.json | package-lock.json | ||
| package.json | package.json | ||
| prettier.config.js | prettier.config.js | ||
Repository files navigation
FunctionalProgramming
FP principles
- Pure Functions -- output depends only on input; no hidden state or side effects.
- Immutability -- data never changes; create new values instead of mutating existing ones.
- Referential Transparency -- any expression can be replaced with its evaluated result without changing program behavior.
- Higher-Order Functions -- either takes function(s) as argument(s) or returns a function(s) as its result.
- Function Composition -- build complex transformations by composing small functions in chains.
- Point-Free Style -- define transformations by combining functions, not naming intermediate data.
- Currying -- transform a function of many arguments into a chain of single-argument functions.
- Partial Application -- pre-fill some arguments to produce specialized functions.
- Algebraic Data Types (ADTs) -- is a composite data (type combining other types).
- Total Functions -- function must return a valid result for every valid input in its type.
- No Hidden State -- avoid local mutation and invisible transitions; state is always explicit.
- Explicit Effects -- model I/O, randomness, time, async, or errors using types (Option, Either, Result, IO, Task).
- Lazy Evaluation -- defer computation until needed; represent infinite sequences naturally.
- Idempotence -- repeated evaluation yields the same result without accumulating side effects.
- Declarative Style -- describe "what" to compute, not "how" to compute it step-by-step.
- Pipeline Processing -- linear data flow; avoid branching when possible by chaining operations.
- Stateless Concurrency -- parallelize pure computations without synchronization.
- Determinism -- same inputs always produce the same outputs; easy reproducibility.
Same principles as in OOP
- Abstraction -- hide internal representation via functions instead of classes.
- Separation of Concerns -- isolate independent transformations, modules, and pipelines.
- Tell, Don't Ask (in FP terms) -- push data into transformations rather than pulling fields for manual operations.
- Information Hiding -- control visibility via module boundaries, closure scope, or type privacy.
- Law of Demeter -- avoid deep object paths; use direct parameters and simple shapes.
- Composition over Inheritance -- FP is fundamentally compositional; small functions compose into larger ones.
- Generics / Parametric Polymorphism -- type-safe reuse of functions across many data types.
Old lectures
About
Functional Programming
www.youtube.com/TimurShemsedinov