Skip to content

Commit d25aa60

Browse files
Update src/FSharpx.Collections/Queue.fs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 2695a37 commit d25aa60

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/FSharpx.Collections/Queue.fs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,13 @@ module Queue =
163163
i <- i + 1)
164164
q.front
165165

166+
let mutable j = q.Length - 1
167+
166168
List.iter
167169
(fun x ->
168-
arr.[i] <- x
169-
i <- i + 1)
170-
(List.rev q.rBack)
170+
arr.[j] <- x
171+
j <- j - 1)
172+
q.rBack
171173

172174
arr
173175

0 commit comments

Comments
 (0)