Skip to content

Commit

Permalink
update std::slices
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Jun 15, 2024
1 parent b7161af commit c5434fa
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/std/slices.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# std::slices
## Functions
```jule
fn Sort[S: []E, E: ordered](mut s: S)
```
Sorts a slice of any ordered type in ascending order. When sorting floating-point numbers, NaNs are ordered before other values.

---

```jule
fn IsSorted[S: []E, E: ordered](mut s: S): bool
```
Reports whether x is sorted in ascending order.

---

```jule
fn Equal[S: []E, E: comparable](s1: S, s2: S): bool
```
Expand Down

0 comments on commit c5434fa

Please sign in to comment.