diff options
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/primitive.md | 4 | ||||
| -rw-r--r-- | spec/reference.bqn | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/primitive.md b/spec/primitive.md index 5fc15001..829729f8 100644 --- a/spec/primitive.md +++ b/spec/primitive.md @@ -165,9 +165,9 @@ For **Select** (`β`), `π¨` is an array of natural numbers, or a list of such **Match** (`β‘`) indicates whether two values are considered equivalent. It always returns 0 or 1, and never causes an error. If both arguments are atoms then it is identical to `=`, and if one is an atom and the other an array then it returns 0. If both arguments are arrays then it returns 1 only if they have the same shape and all pairs of corresponding elements match. Fill elements aren't taken into account, so that arrays that match might still differ in behavior. **Not Match** simply returns the complement of Match, `Β¬β‘`. -Monadic search functions compare the major cells of `π©` to each other. `π©` must have rank at least 1. Except for Unique (`β·`), the result is a list of numbers with the same length as `π©`. +Monadic search functions compare the major cells of `π©` to each other. `π©` must have rank at least 1. Except for Deduplicate (`β·`), the result is a list of numbers with the same length as `π©`. -- **Unique Mask** (`β`) returns 1 for a cell if it doesn't match any earlier cell and 0 if it does. +- **Mark Firsts** (`β`) returns 1 for a cell if it doesn't match any earlier cell and 0 if it does. - **Deduplicate** (`β·`) filters major cells to remove duplicates, retaining the ordering given by the first appearance of each unique cell. - **Classify** (`β`) returns, for each cell, the smallest index of a cell that matches it (it's necessarily less than or equal to `ββ π©` element-wise, since each cell matches itself). - **Occurrence Count** (`β`) returns the number of earlier cells matching each cell. diff --git a/spec/reference.bqn b/spec/reference.bqn index bdfc1f2c..42949e56 100644 --- a/spec/reference.bqn +++ b/spec/reference.bqn @@ -354,7 +354,7 @@ Replicate β {0<=π¨}βΆ(β₯Λββ Repβ’)βΏ{!π¨=ββ π©βπ¨Repπ©} β β ββ(ββ β1) β Group β β Transpose β ReorderAxes β β β·βΈβ β IndexOf -β β UniqueMask β (βΛ<β ββ’) +β β MarkFirst β (βΛ<β ββ’) β· β ββΈ/ β Find β β Cmp _grade β ( Cmp _bins) β β -βCmp _grade β (-βCmp _bins) @@ -398,7 +398,7 @@ IndexOfβ{ ! cβ€=π© π¨ (0<β π¨)βΆβ¨0βcββ’,(+Λβ§`)β’βcβcβΏββ© π© } -UniqueMaskβ{ +MarkFirstβ{ ! 1β€=π© uβ0βπ© {βπ©βu}β{uβ©uβΎπ©β1}βΏ0Λπ© |
