https://github.com/yousefvand/sanctuary-examples
Example projects using sanctuary.js as FP library
https://github.com/yousefvand/sanctuary-examples
examples functional-programming javascript
Last synced: 3 months ago
JSON representation
Example projects using sanctuary.js as FP library
- Host: GitHub
- URL: https://github.com/yousefvand/sanctuary-examples
- Owner: yousefvand
- License: mit
- Created: 2018-11-21T13:05:03.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-16T05:56:44.000Z (almost 7 years ago)
- Last Synced: 2025-03-22T14:22:12.235Z (7 months ago)
- Topics: examples, functional-programming, javascript
- Language: JavaScript
- Size: 121 KB
- Stars: 17
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sanctuary-examples
Example projects using [sanctuary.js](https://github.com/sanctuary-js/sanctuary) as their [FP](https://en.wikipedia.org/wiki/Functional_programming) library.
Read each project `README.md` for more details.
## [Basic](basic/README.md)
- [Array](basic/array/README.md)
- [at](basic/array/at.md)
- [concat](basic/array/concat.md)
- [drop](basic/array/drop.md)
- [dropLast](basic/array/drop-last.md)
- [dropWhile](basic/array/drop-while.md)
- [head](basic/array/head.md)
- [product](basic/array/product.md)
- [range](basic/array/range.md)
- [slice](basic/array/slice.md)
- [size](basic/array/size.md)
- [sort](basic/array/sort.md)
- [tail](basic/array/tail.md)
- [take](basic/array/take.md)
- [takeLast](basic/array/take-last.md)
- [takeWhile](basic/array/take-while.md)
- [reverse](basic/array/reverse.md)
- [flip](basic/array/flip.md)
- [Functions](basic/functions/README.md)
- [map](basic/functions/map.md)
- [I (identity)](basic/functions/identity.md)
- [Logic](basic/logic/README.md)
- [and](basic/logic/and.md)
- [or](basic/logic/or.md)
- [not](basic/logic/not.md)
- [identity](basic/logic/id.md)
- [filter](basic/logic/filter.md)
- [reject](basic/logic/reject.md)
- [complement](basic/logic/complement.md)
- [Math](basic/math/README.md)
- [add](basic/math/add.md)
- [subtract](basic/math/sub.md)
- [minimum](basic/math/min.md)
- [maximum](basic/math/max.md)
- [less than](basic/math/lt.md)
- [less than or equal](basic/math/lte.md)
- [greater than](basic/math/gt.md)
- [greater than or equal](basic/math/gte.md)
- [multiply](basic/math/mult.md)
- [negate](basic/math/negate.md)
- [divide](basic/math/div.md)
- [power](basic/math/pow.md)
- [String](basic/string/README.md)
- [concat](basic/string/concat.md)
- [lines](basic/string/lines.md)
- [unlines](basic/string/unlines.md)
- [words](basic/string/words.md)
- [unwords](basic/string/unwords.md)
- [toUpper](basic/string/toupper.md)
- [toLower](basic/string/tolower.md)
- [splitOn](basic/string/split-on.md)
- [splitOnRegex](basic/string/split-on-regex.md)
- [stripPrefix](basic/string/strip-prefix.md)
- [stripSuffix](basic/string/strip-suffix.md)
- [trim](basic/string/trim.md)
- [types](basic/types/README.md)
- [empty](basic/types/empty.md)
- [is](basic/types/is.md)
- [maybe](basic/types/maybe.md)
- [either](basic/types/either.md)
- [pair](basic/types/pair.md)## Intermediate
- [Logic](intermediate/logic/README.md)
- [Boolean](intermediate/logic/boolean.md)
- Exercises
- [Given any strings, return the word count](intermediate/exercises/word-count.md)
- [Given any number, return the factorial (product of 1 to given number)](intermediate/exercises/factorial.md)
- [Given any strings, return the dotted abbreviation](intermediate/exercises/abbreviate.md)
- [Find localized url version for a given user](intermediate/exercises/user-url.md)## [Advance](advance/README.md)
----------
## Install & Run
From inside script folder:
```bash
npm i sanctuary
```and to `Run` example:
```bash
node script.js
```----------
## Acknowledgments
To All guys in [sanctuary chat room](https://gitter.im/sanctuary-js/sanctuary) who patiently answered the questions and provided understandable analogies and examples.
----------
### PRs are welcome