node package manager

persistent-list

persistent-list Build Status

A persistent, singly linked list, similar to Haskell's [a] type.

Install

npm install --save persistent-list

Examples

var list = require('persistent-list');
 
var a = list.empty();
var b = a.insert(5);
b.toArray() === [5];
a.toArray() === [];

API

List.prototype.

  • reduce
  • each/forEach
  • map
  • filter/reject
  • toArray
  • length
  • isCons/isNone

License

MIT