Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcz committed Sep 22, 2023
1 parent 93342aa commit 749ea1f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Stdlib/Data/List/Base.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,15 @@ mergeSort {A} {{Ord A}} (l : List A) : List A :=
--- ascending order using the QuickSort algorithm.
terminating
quickSort {A} {{Ord A}} : List A → List A :=
let
terminating
go : List A → List A
| nil := nil
| xs@(_ :: nil) := xs
| (x :: xs) :=
case partition (isGT ∘ Ord.cmp x) xs of {l1, l2 :=
go l1 ++ x :: go l2};
in go;
let
terminating
go : List A → List A
| nil := nil
| xs@(_ :: nil) := xs
| (x :: xs) :=
case partition (isGT ∘ Ord.cmp x) xs of {l1, l2 :=
go l1 ++ x :: go l2};
in go;

--- 𝒪(𝓃) Filters out every ;nothing; from a ;List;.
catMaybes {A} : List (Maybe A) -> List A
Expand Down

0 comments on commit 749ea1f

Please sign in to comment.