Skip to content

Commit 7c8bc62

Browse files
Apply suggestions from code review
Co-authored-by: Richard Sill <[email protected]>
1 parent 7ba2c33 commit 7c8bc62

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

modules/ROOT/pages/functions/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Further details and examples of lists may be found in xref::values-and-types/lis
138138

139139
1.1+| xref::functions/list.adoc#functions-coll-indexOf[`coll.indexOf()`]
140140
| `coll.indexOf(list :: LIST<ANY>, value :: ANY) :: INTEGER`
141-
| Returns the index for the first match of value in the given list, if the value is no present, -1 is returned.
141+
| Returns the index of the first match of value in the given list, if the value is no present, -1 is returned.
142142

143143
1.1+| xref::functions/list.adoc#functions-coll-insert[`coll.insert()`]
144144
| `coll.insert(list :: LIST<ANY>, index :: INTEGER, value :: ANY) :: LIST<ANY>`

modules/ROOT/pages/functions/list.adoc

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,10 @@ CREATE
5858
======
5959
6060
.Deduplicate a list of integer values
61-
// tag::functions_list_distinct_ints[]
6261
[source, cypher]
6362
----
6463
RETURN coll.distinct([1, 3, 2, 4, 2, 3, 1])
6564
----
66-
// end::functions_list_distinct_ints[]
6765
6866
A `LIST<ANY>` containing only unique values is returned.
6967
@@ -77,12 +75,12 @@ A `LIST<ANY>` containing only unique values is returned.
7775
|===
7876
7977
.Deduplicate a list of mixed values, including null
80-
// tag::functions_list_distinct_mixed[]
78+
// tag::functions_list_distinct[]
8179
[source, cypher]
8280
----
8381
RETURN coll.distinct([1, true, true, null, 'a', false, true, 1, null])
8482
----
85-
// end::functions_list_distinct_mixed[]
83+
// end::functions_list_distinct[]
8684
8785
A `LIST<ANY>` containing only unique values is returned.
8886
@@ -146,12 +144,10 @@ A `LIST<ANY>` with any inner lists up to a nesting depth of 2 flattened.
146144
|===
147145
148146
.Flatten a list to default of depth 1
149-
// tag::functions_list_flatten_default[]
150147
[source, cypher]
151148
----
152149
RETURN coll.flatten(['a', ['b', ['c']]])
153150
----
154-
// end::functions_list_flatten_default[]
155151
156152
A `LIST<ANY>` with any inner lists up to a nesting depth of 1 (default depth) flattened.
157153
@@ -171,7 +167,7 @@ A `LIST<ANY>` with any inner lists up to a nesting depth of 1 (default depth) fl
171167
.Details
172168
|===
173169
| *Syntax* 3+| `coll.indexOf(list, value)`
174-
| *Description* 3+| Returns the index for the first match of a value in the given list or -1 if the value is not present.
170+
| *Description* 3+| Returns the index of the first match of a value in the given list or -1 if the value is not present.
175171
.3+| *Arguments* | *Name* | *Type* | *Description*
176172
| `list` | `LIST<ANY>` | A list to be searched.
177173
| `value` | `ANY` | A value to search for.
@@ -213,12 +209,10 @@ An `INTEGER` representing the index of the item in the list.
213209
|===
214210
215211
.Search for a value not present in the given list
216-
// tag::functions_list_indexOf_missing[]
217212
[source, cypher]
218213
----
219214
RETURN coll.indexOf([1, 'b', false], 4.3)
220215
----
221-
// end::functions_list_indexOf_missing[]
222216
223217
The `INTEGER` -1 representing that the value is not found.
224218

0 commit comments

Comments
 (0)