From baf67f76107a169e17bfe067fbc94e5afe175716 Mon Sep 17 00:00:00 2001 From: Edoardo La Greca Date: Sun, 14 Sep 2025 17:15:31 +0200 Subject: fix dropJ in second exercise --- lec07/JoinList.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lec07') diff --git a/lec07/JoinList.hs b/lec07/JoinList.hs index 25667c7..5c1165e 100644 --- a/lec07/JoinList.hs +++ b/lec07/JoinList.hs @@ -38,7 +38,7 @@ dropJ n jl@(Single _ _) dropJ n jl@(Append m jl1 jl2) | n <= 0 = jl | n >= m' = Empty - | n < s1 = Append (Size $ m' - n) (dropJ n jl1) jl2 + | n < s1 = dropJ n jl1 +++ jl2 | n >= s1 = dropJ (n - s1) jl2 where s1 = getSize $ size $ tag jl1 -- cgit v1.2.3