frptools / collectable

High-performance immutable data structures for modern JavaScript and TypeScript applications. Functional interfaces, deep/composite operations API, mixed mutability API, TypeScript definitions, ES2015 module exports.
MIT License
273 stars 14 forks source link

LIST(impl): Add of, alt, zero and fold (internal) #54

Closed SimonMeskens closed 7 years ago

SimonMeskens commented 7 years ago

I want to use fold to implement ap/chain/filter/reduce, so I wanted to PR what I've got so far.

SimonMeskens commented 7 years ago

Is there a better way to create a singleton list? The of function doesn't seem very efficient and I kinda need it to be.

axefrog commented 7 years ago

Published to npm.