Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simonrichardson/fantasy-arrays
Arrays
https://github.com/simonrichardson/fantasy-arrays
Last synced: 22 days ago
JSON representation
Arrays
- Host: GitHub
- URL: https://github.com/simonrichardson/fantasy-arrays
- Owner: SimonRichardson
- Created: 2015-09-10T10:44:29.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-15T19:07:29.000Z (about 9 years ago)
- Last Synced: 2024-10-05T07:18:07.028Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 195 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fantasy-arrays
This library implements purely functional, monadic homogenous array
data structures.### Seq
Seq is just a wrapper around the native Array structure, but gives you lots of
other functions that should be useful.```javavscript
var a = Seq.range(0, 12);
a.take(0, 10); // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
```### List
List is a linked lists with associated functions.
```javavscript
var a = List.range(0, 12);
a.take(0, 10); // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
```### NonEmpty
NonEmpty is a structure that can not be empty.
```javavscript
NonEmpty.of(1); // 1
```## Fantasy Land Compatible
[
![](https://raw.github.com/fantasyland/fantasy-land/master/logo.png)
](https://github.com/fantasyland/fantasy-land)