blob: 79ac96e46751d003a7f8bc30c31f42b0b5391f2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/gradeup_binsup.html).*
# Delta Stile (`⍋`)
## `⍋ 𝕩`: Grade Up
[→full documentation](../doc/order.md#grade)
Indices of `𝕩` that would sort its major cells in ascending order.
a ← 3‿2‿1
⍋ a
(⍋a) ⊏ a
## `𝕨 ⍋ 𝕩`: Bins Up
[→full documentation](../doc/order.md#bins)
Binary search for each cell of `𝕩` in `𝕨`, returning the number of major cells in `𝕨` less than or equal to that cell.
`𝕨` must be sorted in ascending order.
3‿4‿5‿7 ⍋ 2
3‿4‿5‿7 ⍋ 2‿6
|