From 43bda411685774a1d552f7ba9f4acad60db19713 Mon Sep 17 00:00:00 2001 From: firephil Date: Wed, 17 Mar 2021 04:01:38 +0200 Subject: [PATCH] Mergesort fixed name --- app/Quicksort.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Quicksort.hs b/app/Quicksort.hs index bbb2969..5564a3a 100644 --- a/app/Quicksort.hs +++ b/app/Quicksort.hs @@ -16,9 +16,9 @@ qsort (x:xs) = qsort ys ++ x : qsort zs quicksort :: [Int] -> [Int] quicksort [] = [] -quicksort list = quicksort left ++ pivotlist ++ quicksort right +quicksort list = quicksort left ++ pivot_list ++ quicksort right where pivot = head list - pivotlist = filter( == pivot) list + pivot_list = filter( == pivot) list left = filter(< pivot) list right = filter(> pivot) list \ No newline at end of file