@@ -67,6 +67,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6767 ` lastIndexOfRange ` , ` lastIndexOfRangeWith ` , ` binarySearch ` , ` binarySearchWithComparer ` ,
6868 ` binarySearchRangeWithComparer ` ) and copies elements into an array (` blit ` ). ` replace ` throws ` ArgumentException ` for a
6969 value that no element equals, as the builder of an indexed list does.
70+ * ` Queue ` has every function of the FSharp.Core ` List ` module that applies to an immutable queue, over the elements in the
71+ order in which they leave the queue, with its semantics and exceptions and with stable sorts, plus ` enqueueMany ` ,
72+ ` ofReadOnlySpan ` , ` ofSpan ` , ` skipLast ` , ` sortWithComparer ` , ` takeLast ` , ` tryTail ` , ` tryUncons ` and ` uncons ` . Its
73+ parameters and exceptions name the queues ` queue ` , ` queue1 ` , ` queue2 ` , ` queue3 ` and ` queues ` where ` List ` names its
74+ lists. ` enqueueMany ` , ` uncons ` , ` tryHead ` , ` tryTail ` and ` tryUncons ` compile to ` EnqueueMany ` , ` PeekDequeue ` ,
75+ ` TryPeek ` , ` TryDequeue ` and ` TryPeekDequeue ` , in the ` IQueue ` , ` Option ` and ` Tuple ` modules too. A function that takes
76+ a sequence throws ` ArgumentNullException ` that names the parameter for a ` null ` sequence and for a default ` FlatList `
77+ given as a sequence, which the BCL would reject with ` InvalidOperationException ` while it enumerates it; the ` IQueue `
78+ module and the ` queue { } ` expression do the same.
79+ * The ` IQueue ` module has the functions of ` Queue ` for ` IImmutableQueue<'T> ` , without the creation functions, plus
80+ ` clear ` . Its functions keep the implementation of the input queue where the result has the element type of the input,
81+ and return a ` Queue ` otherwise. ` append ` enqueues the second queue into the first one, so its result keeps the
82+ implementation of the first queue, also when that queue is empty.
83+ * The ` FSharp.Collections.Immutable.Option ` and ` FSharp.Collections.Immutable.Tuple ` namespaces have ` Queue ` and ` IQueue `
84+ modules that repeat the functions that use value options or struct tuples with options and reference tuples.
85+ * ` queue { } ` builds a queue.
7086
7187### Changed
7288
@@ -124,6 +140,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
124140* ` IndexedList.rev ` builds the reversed list from a reversed copy of the elements. At 100 000 integers it takes about 3 ms
125141 where ` reverse ` , which called ` ImmutableList.Reverse ` , took about 23 ms, and it allocates 5.2 MB where ` reverse `
126142 allocated 4.8 MB.
143+ * ` Queue ` works on ` Queue<'T> ` (` ImmutableQueue<'T> ` ) instead of ` IQueue<'T> ` , and ` enqueue ` , ` tail ` and ` filter ` return a
144+ ` Queue<'T> ` ; the functions for ` IImmutableQueue<'T> ` are in the new ` IQueue ` module.
145+ * ` Queue ` : ` tryFind ` , ` tryFindIndex ` and ` tryPick ` return ` voption ` , and ` pick ` and ` tryPick ` take functions that return
146+ ` voption ` . The complete active pattern ` Cons | Nil ` , whose ` Cons ` case matched a reference tuple of the head and the
147+ tail, is replaced by the struct partial active patterns ` Cons ` , which matches a struct tuple of the head and the tail,
148+ and ` Nil ` .
149+ * ` Queue ` : every function throws what the FSharp.Core ` List ` function of the same name throws. ` head ` and ` tail ` of an
150+ empty queue throw ` ArgumentException ` , where they threw ` InvalidOperationException ` , and ` iter2 ` of queues of
151+ different lengths throws ` ArgumentException ` , where it stopped at the shorter queue. A default ` FlatList ` given as a
152+ sequence to ` ofSeq ` throws ` ArgumentNullException ` , where it threw ` InvalidOperationException ` .
153+ * ` Queue.forall ` and ` Queue.averageBy ` apply to the queue; they returned a function of a sequence before.
154+ * ` Queue ` : ` enqueue ` , ` head ` and ` tail ` compile to ` Enqueue ` , ` Peek ` and ` Dequeue ` , and the other functions to
155+ PascalCase names such as ` IsEmpty ` , where 1.0.0 compiled all of them under their F# names, such as ` isEmpty ` .
127156
128157### Removed
129158
@@ -161,6 +190,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
161190* The ` IndexedSeq ` module and the ` IIndexedSeq<'T> ` abbreviation of ` IReadOnlyList<'T> ` : use ` IReadOnlyList<'T> ` , whose
162191 ` Count ` and indexer replace ` IndexedSeq.length ` and ` IndexedSeq.item ` . ` IndexedSeq.check ` needs no replacement, because
163192 every function of the list modules throws ` ArgumentNullException ` for a ` null ` list.
193+ * ` Queue.clear ` : use ` Queue.empty ` , or ` IQueue.clear ` to keep the implementation of an interface value.
164194
165195## [ 1.0.0] - 2020-02-23
166196
0 commit comments