From 7e2163b7772c1dcefa8865e90de05f5db189e9d6 Mon Sep 17 00:00:00 2001 From: ironhead690 <44122186+ironhead690@users.noreply.github.com> Date: Sun, 18 Oct 2020 22:19:28 +0300 Subject: [PATCH] Create quickSort.hs --- quickSort.hs | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 quickSort.hs diff --git a/quickSort.hs b/quickSort.hs new file mode 100644 index 0000000..e5ad701 --- /dev/null +++ b/quickSort.hs @@ -0,0 +1,3 @@ +quicksort :: (Ord a) => [a] -> [a] +quicksort [] = [] +quicksort (x:xs) = quicksort [y | y <- xs, y <= x] ++ [x] ++ quicksort [y | y <- xs, y > x]