Skip to content

Commit 9d37848

Browse files
authored
resolve comments
1 parent 940e99c commit 9d37848

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/ref/bin.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ x binr y binr[x;y]
2121
Where
2222

2323
- `x` is a sorted list
24-
- `y` is an atom or list of exactly the same type (no type promotion)
24+
- `y` is an atom of exactly the same type (no type promotion)
2525

26-
returns the index of the _last_ item in `x` which is ≤`y`. The result is `-1` for `y` less than the first item of `x`. If `y` is a list, the previous is repeated for each item of `y`.
26+
returns the index of the _last_ item in `x` which is ≤`y`. The result is `-1` for `y` less than the first item of `x`. If `x` is a simple list, `bin` is [atomic](../basics/atomic.md) in `y`. (For higher ranks of either argument, `bin` works the same way as [`?` (Find)](find.md/#type-specific).)
2727
`binr` _binary search right_, introduced in V3.0 2012.07.26, gives the index of the _first_ item in `x` which is ≥`y`.
2828

2929
```q
@@ -81,14 +81,14 @@ r[j]=x bin y[j] for all j in index of y
8181
Where
8282

8383
- `x` is a table of `n` columns
84-
- `y` is a table row with the same schema (i.e. a dictionary)
84+
- `y` is a table row with the same schema (e.g. a list with `n` elements or a dictionary with the same keys as the columns of `x`)
8585

8686
returns the index of the last row of `x` for which
8787

8888
- the first `n-1` values each match the first `n-1` values of `y`, and
8989
- the last value is not greater than the last value of `y`.
9090

91-
If `y` is a table with the same schema as `x`, this is repeated for each row of it.
91+
(For higher ranks, see the examples below as well as the documentation for [`?` (Find)](find.md/#type-specific).)
9292

9393
If no items match the criteria, either because there are no rows that match in the first `n-1` columns, or because the last value is smaller than the last value in the first such row, `0N` is returned.
9494

0 commit comments

Comments
 (0)