Skip to content

Commit c8978e6

Browse files
committed
Add root directory to header comment
1 parent 79452ab commit c8978e6

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

source/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* lazy-linked-lists
33
* Lazy and infinite linked lists for JavaScript.
44
*
5-
* index.js
5+
* source/index.js
66
*
77
* Top level index.
88
*/

source/lib.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* lazy-linked-lists
33
* Lazy and infinite linked lists for JavaScript.
44
*
5-
* lib.js
5+
* source/lib.js
66
*
77
* Core functions for lazy-linked-lists.
88
* @license ISC
@@ -20,9 +20,6 @@ const errorEmptyList = from => new Error(`*** Exception: ${from.name}: empty lis
2020

2121
const errorOutOffRange = from => new Error(`*** Exception: ${from.name}: range error`);
2222

23-
/**
24-
* The empty list.
25-
*/
2623
export const emptyList = new List();
2724

2825
/**
@@ -44,7 +41,11 @@ export const list = (...as) => as.length === 0 ? emptyList : new List(as.shift()
4441
* @returns {List} A `List` that will be evaluated lazily
4542
* @kind function
4643
*/
47-
export const listRange = (start, end) => listRangeBy(start, end, (x => x + 1));
44+
export const listRange = (start, end) => {
45+
if (start === end) { return list(start); }
46+
if (start > end) { return listRangeBy(start, end, x => x - 1); }
47+
return listRangeBy(start, end, x => x + 1);
48+
}
4849

4950
/**
5051
* Build a `List` from a range of values using lazy evaluation and incrementing it using a given

source/list.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* lazy-linked-lists
33
* Lazy and infinite linked lists for JavaScript.
44
*
5-
* list.js
5+
* source/list.js
66
*
77
* List data type.
88
* @license ISC

source/ord.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* lazy-linked-lists
33
* Lazy and infinite linked lists for JavaScript.
44
*
5-
* ord.js
5+
* source/ord.js
66
*
77
* Ordering symbols.
88
* @license ISC

0 commit comments

Comments
 (0)