Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tom-sherman/orangutan
https://github.com/tom-sherman/orangutan
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/tom-sherman/orangutan
- Owner: tom-sherman
- Created: 2019-06-06T20:22:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-30T09:10:36.000Z (almost 5 years ago)
- Last Synced: 2024-12-01T07:43:21.291Z (24 days ago)
- Language: TypeScript
- Homepage:
- Size: 266 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Orangutan
> o-range-utan
A lazy range and list library for JavaScript. Heavily inspired by Haskell's lists and range syntax.
## Requirements
Orangutan is currently distributed as an ES6 module using native iterators and generators. This means your environment must support `function*` and `import`/`export` syntax constructs.
## Haskell vs Orangutan
There are many parallels between Orangutan and Haskell's lists/ranges
### Ranges
```js
// [1, 3..20]
range(1, 3, 20)// [1..5]
range(1, undefined, 5)// [3..]
range(3)
```