Skip to content

Commit c5434fa

Browse files
committed
update std::slices
1 parent b7161af commit c5434fa

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/std/slices.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# std::slices
22
## Functions
3+
```jule
4+
fn Sort[S: []E, E: ordered](mut s: S)
5+
```
6+
Sorts a slice of any ordered type in ascending order. When sorting floating-point numbers, NaNs are ordered before other values.
7+
8+
---
9+
10+
```jule
11+
fn IsSorted[S: []E, E: ordered](mut s: S): bool
12+
```
13+
Reports whether x is sorted in ascending order.
14+
15+
---
16+
317
```jule
418
fn Equal[S: []E, E: comparable](s1: S, s2: S): bool
519
```

0 commit comments

Comments
 (0)