Skip to content

Commit

Permalink
Updates:
Browse files Browse the repository at this point in the history
- Fix bug with LinkedList's shift(), unshift() and remove() methods,
where tail pointer was not being updated correctly, potentially causing
unexpected behavior on subsequent list modifications
  • Loading branch information
havelessbemore committed May 20, 2021
1 parent 0f470df commit c9baa64
Show file tree
Hide file tree
Showing 27 changed files with 338 additions and 345 deletions.
2 changes: 1 addition & 1 deletion dist/dastal.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/dastal.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dastal - v1.3.0
dastal - v1.3.1

# dastal - v1.3.0
# dastal - v1.3.1

## Table of contents

Expand Down
50 changes: 25 additions & 25 deletions docs/classes/arraylist.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[dastal - v1.3.0](../README.md) / ArrayList
[dastal - v1.3.1](../README.md) / ArrayList

# Class: ArrayList<T\>

Expand Down Expand Up @@ -67,7 +67,7 @@ An implementation of the [List](../interfaces/list.md) interface using an array

**Returns:** [*ArrayList*](arraylist.md)<T\>

Defined in: [src/list/arrayList.ts:11](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L11)
Defined in: [src/list/arrayList.ts:11](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L11)

## Accessors

Expand All @@ -81,7 +81,7 @@ The number of elements in this list

Implementation of: [List](../interfaces/list.md).[size](../interfaces/list.md#size)

Defined in: [src/list/arrayList.ts:223](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L223)
Defined in: [src/list/arrayList.ts:222](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L222)

## Methods

Expand All @@ -99,7 +99,7 @@ An iterator through the list

Implementation of: [List](../interfaces/list.md)

Defined in: [src/list/arrayList.ts:281](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L281)
Defined in: [src/list/arrayList.ts:280](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L280)

___

Expand All @@ -122,7 +122,7 @@ The new size of the list

Implementation of: [List](../interfaces/list.md)

Defined in: [src/list/arrayList.ts:24](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L24)
Defined in: [src/list/arrayList.ts:24](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L24)

___

Expand All @@ -145,7 +145,7 @@ The new size of the list

Implementation of: [List](../interfaces/list.md)

Defined in: [src/list/arrayList.ts:38](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L38)
Defined in: [src/list/arrayList.ts:38](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L38)

___

Expand All @@ -159,7 +159,7 @@ Removes all elements

Implementation of: [List](../interfaces/list.md)

Defined in: [src/list/arrayList.ts:50](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L50)
Defined in: [src/list/arrayList.ts:50](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L50)

___

Expand All @@ -184,7 +184,7 @@ does not recurse into nested iterable arguments

Implementation of: [List](../interfaces/list.md)

Defined in: [src/list/arrayList.ts:63](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L63)
Defined in: [src/list/arrayList.ts:63](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L63)

___

Expand Down Expand Up @@ -214,7 +214,7 @@ The list

Implementation of: [List](../interfaces/list.md)

Defined in: [src/list/arrayList.ts:87](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L87)
Defined in: [src/list/arrayList.ts:85](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L85)

___

Expand All @@ -241,7 +241,7 @@ The list on which this method was called

Implementation of: [List](../interfaces/list.md)

Defined in: [src/list/arrayList.ts:106](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L106)
Defined in: [src/list/arrayList.ts:104](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L104)

___

Expand All @@ -266,7 +266,7 @@ The element at the index, or `undefined` if index is invalid

Implementation of: [List](../interfaces/list.md)

Defined in: [src/list/arrayList.ts:122](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L122)
Defined in: [src/list/arrayList.ts:120](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L120)

___

Expand All @@ -292,7 +292,7 @@ The previous element at the index, or `undefined` if index is invalid

Implementation of: [List](../interfaces/list.md)

Defined in: [src/list/arrayList.ts:137](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L137)
Defined in: [src/list/arrayList.ts:135](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L135)

___

Expand All @@ -308,7 +308,7 @@ The element at the end of the list, or `undefined` if empty.

Implementation of: [List](../interfaces/list.md)

Defined in: [src/list/arrayList.ts:150](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L150)
Defined in: [src/list/arrayList.ts:148](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L148)

___

Expand All @@ -330,7 +330,7 @@ The new size of the list

Implementation of: [List](../interfaces/list.md)

Defined in: [src/list/arrayList.ts:160](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L160)
Defined in: [src/list/arrayList.ts:158](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L158)

___

Expand All @@ -355,7 +355,7 @@ The value at the index, or `undefined` if the index is invalid

Implementation of: [List](../interfaces/list.md)

Defined in: [src/list/arrayList.ts:173](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L173)
Defined in: [src/list/arrayList.ts:171](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L171)

___

Expand All @@ -381,7 +381,7 @@ a reference to the same list

Implementation of: [List](../interfaces/list.md)

Defined in: [src/list/arrayList.ts:187](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L187)
Defined in: [src/list/arrayList.ts:185](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L185)

___

Expand All @@ -404,7 +404,7 @@ The previous element in the index, or undefined if the index is invalid

Implementation of: [List](../interfaces/list.md)

Defined in: [src/list/arrayList.ts:204](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L204)
Defined in: [src/list/arrayList.ts:203](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L203)

___

Expand All @@ -420,7 +420,7 @@ The element at the front of the list or `undefined` if this list is empty.

Implementation of: [List](../interfaces/list.md)

Defined in: [src/list/arrayList.ts:217](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L217)
Defined in: [src/list/arrayList.ts:216](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L216)

___

Expand All @@ -446,7 +446,7 @@ A new list with a copy of the indicated section of the original list

Implementation of: [List](../interfaces/list.md)

Defined in: [src/list/arrayList.ts:237](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L237)
Defined in: [src/list/arrayList.ts:236](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L236)

___

Expand All @@ -471,7 +471,7 @@ A new list of deleted elements

Implementation of: [List](../interfaces/list.md)

Defined in: [src/list/arrayList.ts:264](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L264)
Defined in: [src/list/arrayList.ts:263](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L263)

___

Expand All @@ -493,7 +493,7 @@ The new size of the list

Implementation of: [List](../interfaces/list.md)

Defined in: [src/list/arrayList.ts:291](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L291)
Defined in: [src/list/arrayList.ts:290](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L290)

___

Expand All @@ -515,7 +515,7 @@ The list on which this method was called

Implementation of: [List](../interfaces/list.md)

Defined in: [src/list/arrayList.ts:301](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L301)
Defined in: [src/list/arrayList.ts:300](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L300)

**update**(`min`: *undefined* \| *number*, `callback`: (`element`: T, `index`: *number*) => T): [*ArrayList*](arraylist.md)<T\>

Expand All @@ -537,7 +537,7 @@ The list on which this method was called

Implementation of: [List](../interfaces/list.md)

Defined in: [src/list/arrayList.ts:313](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L313)
Defined in: [src/list/arrayList.ts:312](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L312)

**update**(`min`: *undefined* \| *number*, `max`: *undefined* \| *number*, `callback`: (`element`: T, `index`: *number*) => T): [*ArrayList*](arraylist.md)<T\>

Expand All @@ -560,7 +560,7 @@ The list on which this method was called

Implementation of: [List](../interfaces/list.md)

Defined in: [src/list/arrayList.ts:326](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L326)
Defined in: [src/list/arrayList.ts:325](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L325)

___

Expand Down Expand Up @@ -588,4 +588,4 @@ An iterator through the indicated section of the list

Implementation of: [List](../interfaces/list.md)

Defined in: [src/list/arrayList.ts:366](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/list/arrayList.ts#L366)
Defined in: [src/list/arrayList.ts:365](https://github.com/havelessbemore/dastal/blob/0f470df/src/list/arrayList.ts#L365)
16 changes: 8 additions & 8 deletions docs/classes/arrayqueue.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[dastal - v1.3.0](../README.md) / ArrayQueue
[dastal - v1.3.1](../README.md) / ArrayQueue

# Class: ArrayQueue<T\>

Expand Down Expand Up @@ -52,7 +52,7 @@ An implementation of the [Queue](../interfaces/queue.md) interface using an arra

**Returns:** [*ArrayQueue*](arrayqueue.md)<T\>

Defined in: [src/queue/arrayQueue.ts:10](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/queue/arrayQueue.ts#L10)
Defined in: [src/queue/arrayQueue.ts:10](https://github.com/havelessbemore/dastal/blob/0f470df/src/queue/arrayQueue.ts#L10)

## Accessors

Expand All @@ -66,7 +66,7 @@ The number of elements in this queue

Implementation of: [Queue](../interfaces/queue.md).[size](../interfaces/queue.md#size)

Defined in: [src/queue/arrayQueue.ts:48](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/queue/arrayQueue.ts#L48)
Defined in: [src/queue/arrayQueue.ts:48](https://github.com/havelessbemore/dastal/blob/0f470df/src/queue/arrayQueue.ts#L48)

## Methods

Expand All @@ -84,7 +84,7 @@ An iterator through the queue

Implementation of: [Queue](../interfaces/queue.md)

Defined in: [src/queue/arrayQueue.ts:58](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/queue/arrayQueue.ts#L58)
Defined in: [src/queue/arrayQueue.ts:58](https://github.com/havelessbemore/dastal/blob/0f470df/src/queue/arrayQueue.ts#L58)

___

Expand All @@ -98,7 +98,7 @@ Removes all elements from this queue

Implementation of: [Queue](../interfaces/queue.md)

Defined in: [src/queue/arrayQueue.ts:18](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/queue/arrayQueue.ts#L18)
Defined in: [src/queue/arrayQueue.ts:18](https://github.com/havelessbemore/dastal/blob/0f470df/src/queue/arrayQueue.ts#L18)

___

Expand All @@ -114,7 +114,7 @@ The element at the head of the queue or `undefined` if this queue is empty.

Implementation of: [Queue](../interfaces/queue.md)

Defined in: [src/queue/arrayQueue.ts:26](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/queue/arrayQueue.ts#L26)
Defined in: [src/queue/arrayQueue.ts:26](https://github.com/havelessbemore/dastal/blob/0f470df/src/queue/arrayQueue.ts#L26)

___

Expand All @@ -134,7 +134,7 @@ Inserts the specified element into this queue

Implementation of: [Queue](../interfaces/queue.md)

Defined in: [src/queue/arrayQueue.ts:34](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/queue/arrayQueue.ts#L34)
Defined in: [src/queue/arrayQueue.ts:34](https://github.com/havelessbemore/dastal/blob/0f470df/src/queue/arrayQueue.ts#L34)

___

Expand All @@ -150,4 +150,4 @@ The value at the head of the queue or `undefined` if this queue is empty.

Implementation of: [Queue](../interfaces/queue.md)

Defined in: [src/queue/arrayQueue.ts:42](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/queue/arrayQueue.ts#L42)
Defined in: [src/queue/arrayQueue.ts:42](https://github.com/havelessbemore/dastal/blob/0f470df/src/queue/arrayQueue.ts#L42)
16 changes: 8 additions & 8 deletions docs/classes/arraystack.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[dastal - v1.3.0](../README.md) / ArrayStack
[dastal - v1.3.1](../README.md) / ArrayStack

# Class: ArrayStack<T\>

Expand Down Expand Up @@ -52,7 +52,7 @@ An implementation of the [Stack](../interfaces/stack.md) interface using an arra

**Returns:** [*ArrayStack*](arraystack.md)<T\>

Defined in: [src/stack/arrayStack.ts:10](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/stack/arrayStack.ts#L10)
Defined in: [src/stack/arrayStack.ts:10](https://github.com/havelessbemore/dastal/blob/0f470df/src/stack/arrayStack.ts#L10)

## Accessors

Expand All @@ -66,7 +66,7 @@ The number of elements in the stack

Implementation of: [Stack](../interfaces/stack.md).[size](../interfaces/stack.md#size)

Defined in: [src/stack/arrayStack.ts:50](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/stack/arrayStack.ts#L50)
Defined in: [src/stack/arrayStack.ts:50](https://github.com/havelessbemore/dastal/blob/0f470df/src/stack/arrayStack.ts#L50)

## Methods

Expand All @@ -84,7 +84,7 @@ An iterator through the stack

Implementation of: [Stack](../interfaces/stack.md)

Defined in: [src/stack/arrayStack.ts:60](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/stack/arrayStack.ts#L60)
Defined in: [src/stack/arrayStack.ts:60](https://github.com/havelessbemore/dastal/blob/0f470df/src/stack/arrayStack.ts#L60)

___

Expand All @@ -98,7 +98,7 @@ Removes all elements from the stack

Implementation of: [Stack](../interfaces/stack.md)

Defined in: [src/stack/arrayStack.ts:18](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/stack/arrayStack.ts#L18)
Defined in: [src/stack/arrayStack.ts:18](https://github.com/havelessbemore/dastal/blob/0f470df/src/stack/arrayStack.ts#L18)

___

Expand All @@ -114,7 +114,7 @@ The element at the top of the stack or `undefined` if empty.

Implementation of: [Stack](../interfaces/stack.md)

Defined in: [src/stack/arrayStack.ts:26](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/stack/arrayStack.ts#L26)
Defined in: [src/stack/arrayStack.ts:26](https://github.com/havelessbemore/dastal/blob/0f470df/src/stack/arrayStack.ts#L26)

___

Expand All @@ -130,7 +130,7 @@ The element at the top of the stack or `undefined` if empty.

Implementation of: [Stack](../interfaces/stack.md)

Defined in: [src/stack/arrayStack.ts:34](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/stack/arrayStack.ts#L34)
Defined in: [src/stack/arrayStack.ts:34](https://github.com/havelessbemore/dastal/blob/0f470df/src/stack/arrayStack.ts#L34)

___

Expand All @@ -152,4 +152,4 @@ The new size of the stack

Implementation of: [Stack](../interfaces/stack.md)

Defined in: [src/stack/arrayStack.ts:44](https://github.com/havelessbemore/dastal/blob/cb5e8f6/src/stack/arrayStack.ts#L44)
Defined in: [src/stack/arrayStack.ts:44](https://github.com/havelessbemore/dastal/blob/0f470df/src/stack/arrayStack.ts#L44)
Loading

0 comments on commit c9baa64

Please sign in to comment.