You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: stdlib/queue.gr
+11-9Lines changed: 11 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
* @module Queue: An immutable queue implementation. A queue is a FIFO (first-in-first-out) data structure where new values are added to the end and retrieved or removed from the beginning.
3
3
* @example import Queue from "queue"
4
4
* @since v0.2.0
5
+
*
6
+
* @deprecated This module will be renamed to ImmutableQueue in the v0.6.0 release of Grain.
5
7
*/
6
8
import List from "list"
7
9
@@ -20,7 +22,7 @@ record Queue<a> {
20
22
21
23
/**
22
24
* An empty queue.
23
-
*
25
+
*
24
26
* @since v0.5.4
25
27
*/
26
28
export let empty = {
@@ -30,11 +32,11 @@ export let empty = {
30
32
31
33
/**
32
34
* Creates an empty queue.
33
-
*
35
+
*
34
36
* @returns An empty queue
35
-
*
37
+
*
36
38
* @deprecated This will be removed in the v0.6.0 release of Grain.
37
-
*
39
+
*
38
40
* @since v0.2.0
39
41
*/
40
42
export let make = () => {
@@ -43,7 +45,7 @@ export let make = () => {
43
45
44
46
/**
45
47
* Checks if the given queue contains any values.
46
-
*
48
+
*
47
49
* @param queue: The queue to check
48
50
* @returns `true` if the given queue is empty or `false` otherwise
49
51
*
@@ -58,7 +60,7 @@ export let isEmpty = queue => {
58
60
59
61
/**
60
62
* Returns the value at the beginning of the queue. It is not removed from the queue.
61
-
*
63
+
*
62
64
* @param queue: The queue to inspect
63
65
* @returns `Some(value)` containing the value at the beginning of the queue, or `None` if the queue is empty
Copy file name to clipboardExpand all lines: stdlib/queue.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
title: Queue
3
3
---
4
4
5
+
> **Deprecated:** This module will be renamed to ImmutableQueue in the v0.6.0 release of Grain.
6
+
5
7
An immutable queue implementation. A queue is a FIFO (first-in-first-out) data structure where new values are added to the end and retrieved or removed from the beginning.
Copy file name to clipboardExpand all lines: stdlib/stack.gr
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
/**
2
2
* @module Stack: An immutable stack implementation. A stack is a LIFO (last-in-first-out) data structure where new values are added, retrieved, and removed from the end.
3
3
* @example import Stack from "stack"
4
+
*
5
+
* @deprecated This module will be renamed to ImmutableStack in the v0.6.0 release of Grain.
4
6
*/
5
7
6
8
import List from "list"
@@ -22,7 +24,7 @@ record Stack<a> {
22
24
23
25
/**
24
26
* An empty stack.
25
-
*
27
+
*
26
28
* @since v0.5.4
27
29
*/
28
30
export let empty = {
@@ -34,7 +36,7 @@ export let empty = {
34
36
* Creates a new stack.
35
37
*
36
38
* @returns An empty stack
37
-
*
39
+
*
38
40
* @deprecated This will be removed in the v0.6.0 release of Grain.
Copy file name to clipboardExpand all lines: stdlib/stack.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
title: Stack
3
3
---
4
4
5
+
> **Deprecated:** This module will be renamed to ImmutableStack in the v0.6.0 release of Grain.
6
+
5
7
An immutable stack implementation. A stack is a LIFO (last-in-first-out) data structure where new values are added, retrieved, and removed from the end.
0 commit comments