From 24e1450dedca64e2cb8d692d65f19dce3d76001d Mon Sep 17 00:00:00 2001 From: stefan-hoeck Date: Thu, 26 Sep 2024 08:29:35 +0200 Subject: [PATCH] [ fix ] prepend implementation --- src/Data/Queue.idr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Data/Queue.idr b/src/Data/Queue.idr index c2d36b9..6da7378 100644 --- a/src/Data/Queue.idr +++ b/src/Data/Queue.idr @@ -72,7 +72,7 @@ dequeue (Q front back) = ||| `peekOldest`. export prepend : a -> Queue a -> Queue a -prepend x (Q f b) = Q f (b :< x) +prepend x (Q f b) = Q (x::f) b ||| Return the last element of the queue, plus the unmodified ||| queue.