mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
fix sortAsc sortDesc docs
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
This commit is contained in:
parent
26e21addee
commit
9a6eefdbcf
1 changed files with 2 additions and 4 deletions
|
@ -944,15 +944,13 @@ expect
|
|||
## Sort with a custom comparison function
|
||||
sortWith : List a, (a, a -> [LT, EQ, GT]) -> List a
|
||||
|
||||
## Sorts a list in ascending order (lowest to highest), using a function which
|
||||
## specifies a way to represent each element as a number.
|
||||
## Sorts a list of numbers in ascending order (lowest to highest).
|
||||
##
|
||||
## To sort in descending order (highest to lowest), use [List.sortDesc] instead.
|
||||
sortAsc : List (Num a) -> List (Num a)
|
||||
sortAsc = \list -> List.sortWith list Num.compare
|
||||
|
||||
## Sorts a list in descending order (highest to lowest), using a function which
|
||||
## specifies a way to represent each element as a number.
|
||||
## Sorts a list of numbers in descending order (highest to lowest).
|
||||
##
|
||||
## To sort in ascending order (lowest to highest), use [List.sortAsc] instead.
|
||||
sortDesc : List (Num a) -> List (Num a)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue