https://github.com/ryanmcdermott/js-fp-algorithms
JavaScript algorithms, in a functional programming style
https://github.com/ryanmcdermott/js-fp-algorithms
Last synced: 10 months ago
JSON representation
JavaScript algorithms, in a functional programming style
- Host: GitHub
- URL: https://github.com/ryanmcdermott/js-fp-algorithms
- Owner: ryanmcdermott
- License: mit
- Created: 2017-11-25T21:25:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-06T04:38:16.000Z (over 8 years ago)
- Last Synced: 2025-04-22T15:13:50.467Z (about 1 year ago)
- Language: JavaScript
- Size: 57.6 KB
- Stars: 50
- Watchers: 4
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# js-fp-algorithms [](https://travis-ci.org/ryanmcdermott/js-fp-algorithms)
A collection of algorithms written in JavaScript in a functional programming
style.
## The Philosophy
You might think that a "functional programming style" means monads, cofunctors,
and applicative dinguses. Actually, it just means no loops, no mutations, and
no side effects,
### No loops
Anything expressed in `for` and `while` can also be expressed in recursion.
### No mutations
No variables are mutated because there are no variables, only constants.
### No side effects
Functions will always produce the same output given the same input. No sneaky
global variables, calling the network, or running quicksort and then deleting
all your songs on Spotify.
## Installation
`npm install`
## Testing
`npm t`