Skip to content

Commit

Permalink
[ fix ] bug in peekOldest
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-hoeck committed Sep 26, 2024
1 parent 3f303a1 commit 84cf91e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Data/Queue.idr
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export
peekOldest : Queue a -> Maybe (a, Queue a)
peekOldest q =
case dequeue q of
Just (v,q') => Just (v, prepend v q')
Just (v,q') => Just (v, q)
Nothing => Nothing

||| Appends two `Queues`. O(m + n)
Expand Down

0 comments on commit 84cf91e

Please sign in to comment.