standard-data-structures
Advanced tools
Comparing version 1.2.0 to 1.3.0
var typedoc = typedoc || {}; | ||
typedoc.search = typedoc.search || {}; | ||
typedoc.search.data = {"kinds":{"32":"Variable","128":"Class","256":"Interface","1024":"Property","2048":"Method","262144":"Accessor","2097152":"Object literal"},"rows":[{"id":0,"kind":256,"name":"ICollection","url":"interfaces/icollection.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":1,"kind":2048,"name":"fold","url":"interfaces/icollection.html#fold","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"ICollection"},{"id":2,"kind":2048,"name":"map","url":"interfaces/icollection.html#map","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"ICollection"},{"id":3,"kind":2048,"name":"reduce","url":"interfaces/icollection.html#reduce","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"ICollection"},{"id":4,"kind":128,"name":"List","url":"classes/list.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":5,"kind":262144,"name":"empty","url":"classes/list.html#empty","classes":"tsd-kind-get-signature tsd-parent-kind-class tsd-is-static","parent":"List"},{"id":6,"kind":2048,"name":"of","url":"classes/list.html#of","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"List"},{"id":7,"kind":1024,"name":"head","url":"classes/list.html#head","classes":"tsd-kind-property tsd-parent-kind-class","parent":"List"},{"id":8,"kind":1024,"name":"isEmpty","url":"classes/list.html#isempty","classes":"tsd-kind-property tsd-parent-kind-class","parent":"List"},{"id":9,"kind":1024,"name":"tail","url":"classes/list.html#tail","classes":"tsd-kind-property tsd-parent-kind-class","parent":"List"},{"id":10,"kind":2048,"name":"fold","url":"classes/list.html#fold","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"List"},{"id":11,"kind":2048,"name":"map","url":"classes/list.html#map","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"List"},{"id":12,"kind":2048,"name":"prepend","url":"classes/list.html#prepend","classes":"tsd-kind-method tsd-parent-kind-class","parent":"List"},{"id":13,"kind":2048,"name":"reduce","url":"classes/list.html#reduce","classes":"tsd-kind-method tsd-parent-kind-class","parent":"List"},{"id":14,"kind":128,"name":"MaxHeap","url":"classes/maxheap.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":15,"kind":2048,"name":"of","url":"classes/maxheap.html#of","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"MaxHeap"},{"id":16,"kind":262144,"name":"numbers","url":"classes/maxheap.html#numbers","classes":"tsd-kind-get-signature tsd-parent-kind-class tsd-is-static","parent":"MaxHeap"},{"id":17,"kind":262144,"name":"length","url":"classes/maxheap.html#length","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"MaxHeap"},{"id":18,"kind":262144,"name":"peek","url":"classes/maxheap.html#peek","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"MaxHeap"},{"id":19,"kind":2048,"name":"pop","url":"classes/maxheap.html#pop","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MaxHeap"},{"id":20,"kind":2048,"name":"push","url":"classes/maxheap.html#push","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MaxHeap"},{"id":21,"kind":2097152,"name":"immutable","url":"globals.html#immutable","classes":"tsd-kind-object-literal"},{"id":22,"kind":32,"name":"List","url":"globals.html#immutable.list","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"immutable"},{"id":23,"kind":2097152,"name":"mutable","url":"globals.html#mutable","classes":"tsd-kind-object-literal"},{"id":24,"kind":32,"name":"MaxHeap","url":"globals.html#mutable.maxheap","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"mutable"}]}; | ||
typedoc.search.data = {"kinds":{"32":"Variable","128":"Class","256":"Interface","1024":"Property","2048":"Method","262144":"Accessor","2097152":"Object literal"},"rows":[{"id":0,"kind":256,"name":"ICollection","url":"interfaces/icollection.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":1,"kind":1024,"name":"asArray","url":"interfaces/icollection.html#asarray","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ICollection"},{"id":2,"kind":2048,"name":"fold","url":"interfaces/icollection.html#fold","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"ICollection"},{"id":3,"kind":2048,"name":"map","url":"interfaces/icollection.html#map","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"ICollection"},{"id":4,"kind":2048,"name":"reduce","url":"interfaces/icollection.html#reduce","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"ICollection"},{"id":5,"kind":128,"name":"List","url":"classes/list.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":6,"kind":262144,"name":"empty","url":"classes/list.html#empty","classes":"tsd-kind-get-signature tsd-parent-kind-class tsd-is-static","parent":"List"},{"id":7,"kind":2048,"name":"of","url":"classes/list.html#of","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"List"},{"id":8,"kind":1024,"name":"head","url":"classes/list.html#head","classes":"tsd-kind-property tsd-parent-kind-class","parent":"List"},{"id":9,"kind":1024,"name":"isEmpty","url":"classes/list.html#isempty","classes":"tsd-kind-property tsd-parent-kind-class","parent":"List"},{"id":10,"kind":1024,"name":"tail","url":"classes/list.html#tail","classes":"tsd-kind-property tsd-parent-kind-class","parent":"List"},{"id":11,"kind":2048,"name":"fold","url":"classes/list.html#fold","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"List"},{"id":12,"kind":2048,"name":"map","url":"classes/list.html#map","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"List"},{"id":13,"kind":2048,"name":"prepend","url":"classes/list.html#prepend","classes":"tsd-kind-method tsd-parent-kind-class","parent":"List"},{"id":14,"kind":2048,"name":"reduce","url":"classes/list.html#reduce","classes":"tsd-kind-method tsd-parent-kind-class","parent":"List"},{"id":15,"kind":262144,"name":"asArray","url":"classes/list.html#asarray","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"List"},{"id":16,"kind":128,"name":"MaxHeap","url":"classes/maxheap.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":17,"kind":2048,"name":"of","url":"classes/maxheap.html#of","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-static","parent":"MaxHeap"},{"id":18,"kind":262144,"name":"numbers","url":"classes/maxheap.html#numbers","classes":"tsd-kind-get-signature tsd-parent-kind-class tsd-is-static","parent":"MaxHeap"},{"id":19,"kind":262144,"name":"length","url":"classes/maxheap.html#length","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"MaxHeap"},{"id":20,"kind":262144,"name":"peek","url":"classes/maxheap.html#peek","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"MaxHeap"},{"id":21,"kind":2048,"name":"pop","url":"classes/maxheap.html#pop","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MaxHeap"},{"id":22,"kind":2048,"name":"push","url":"classes/maxheap.html#push","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MaxHeap"},{"id":23,"kind":2097152,"name":"immutable","url":"globals.html#immutable","classes":"tsd-kind-object-literal"},{"id":24,"kind":32,"name":"List","url":"globals.html#immutable.list","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"immutable"},{"id":25,"kind":2097152,"name":"mutable","url":"globals.html#mutable","classes":"tsd-kind-object-literal"},{"id":26,"kind":32,"name":"MaxHeap","url":"globals.html#mutable.maxheap","classes":"tsd-kind-variable tsd-parent-kind-object-literal","parent":"mutable"}]}; |
@@ -30,3 +30,3 @@ { | ||
}, | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"devDependencies": { | ||
@@ -33,0 +33,0 @@ "@types/chai": "^4.1.7", |
@@ -42,2 +42,6 @@ import { ICollection } from '../internals/iCollection'; | ||
reduce(ab: (a: A, b: A) => A): A; | ||
/** | ||
* Converts a list into an Array | ||
*/ | ||
readonly asArray: A[]; | ||
} |
@@ -60,2 +60,11 @@ "use strict"; | ||
} | ||
/** | ||
* Converts a list into an Array | ||
*/ | ||
get asArray() { | ||
return this.fold([], (a, b) => { | ||
b.push(a); | ||
return b; | ||
}); | ||
} | ||
} | ||
@@ -62,0 +71,0 @@ exports.List = List; |
@@ -6,2 +6,6 @@ /** | ||
/** | ||
* Converts the collection into an array | ||
*/ | ||
asArray: A[]; | ||
/** | ||
* Converts a collection into a value | ||
@@ -8,0 +12,0 @@ */ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
568490
1617