You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/dictionary/command/intersect.lcdoc
+20-9Lines changed: 20 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -75,15 +75,26 @@ targetArray (array): The value to modify.
75
75
templateArray (array): The array to intersect <array> with.
76
76
77
77
Description:
78
-
Use the <intersect> <command> to filter out <element(glossary)|elements> from an <array> according to the contents of another <array>.
79
-
80
-
The recursively adverb controls whether the intersection recurses through nested arrays or not.
81
-
82
-
Each key of <targetArray> is checked to see whether there is a matching <key> in <templateArray>. The <element(glossary)|elements> of <targetArray> that do not match an <element(keyword)> of the <templateArray> are removed from <targetArray>.
83
-
84
-
After the <intersection> <command> is <execute|executed>, the <keys> of <targetArray> consists of the logical intersection of the <keys> of the original <targetArray> and the keys of <templateArray>.
85
-
86
-
The content of individual elements of the <templateArray> does not affect the final result. Only which <element(glossary)|elements> exist in the <templateArray>, not their content, controls which <element(glossary)|elements> of <targetArray> are retained and which are removed. If <targetArray> and <templateArray> have the same set of <element(glossary)|elements> but different content in each <element(keyword)>, the <intersect> <command> does not change the value of <targetArray>.
78
+
Use the <intersect> <command> to filter out <element(glossary)|elements> from an <array>
79
+
according to the contents of another <array>.
80
+
81
+
The recursively adverb controls whether the intersection recurses through nested arrays or
82
+
not.
83
+
84
+
Each key of <targetArray> is checked to see whether there is a matching <key> in
85
+
<templateArray>. The <element(glossary)|elements> of <targetArray> that do not match an
86
+
<element(keyword)> of the <templateArray> are removed from <targetArray>.
87
+
88
+
After the <intersection> <command> is <execute|executed>, the <keys> of <targetArray>
89
+
consists of the logical intersection of the <keys> of the original <targetArray> and the
90
+
keys of <templateArray>.
91
+
92
+
The content of individual elements of the <templateArray> does not affect the final result.
93
+
Only which <element(glossary)|elements> exist in the <templateArray>, not their content,
94
+
controls which <element(glossary)|elements> of <targetArray> are retained and which are
95
+
removed. If <targetArray> and <templateArray> have the same set of
96
+
<element(glossary)|elements> but different content in each <element(keyword)>, the
97
+
<intersect> <command> does not change the value of <targetArray>.
87
98
88
99
References: split (command), union (command), element (keyword), element (glossary), array (glossary), command (glossary), key (glossary)
Copy file name to clipboardExpand all lines: docs/dictionary/command/union.lcdoc
+16-7Lines changed: 16 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -77,13 +77,22 @@ templateArray (array): The array to intersect <array> with.
77
77
Description:
78
78
Use the <union> <command> to combine two <array|arrays>, eliminating duplicate elements.
79
79
80
-
The recursively adverb controls whether the intersection recurses through nested arrays or not.
81
-
82
-
The <union> <command> combines <targetArray> and <templateArray>. Each <key> of <targetArray> is checked to see whether there is already an <element(keyword)> with that <key> in <templateArray>. If there is, that <element(keyword)> of <targetArray> is unchanged. If not, the corresponding <element(keyword)> of the <templateArray> is placed in <targetArray>.
83
-
84
-
After the <union> <command> is <execute|executed>, the <keys> of <targetArray> consists of the logical union of the <keys> of the original <targetArray> and the keys of <templateArray>.
85
-
86
-
The content of individual elements of the <templateArray> does not control the final result. Only which <element(glossary)|elements> exist in the <templateArray>, not their content, controls which <element(glossary)|elements> of the <templateArray> are placed in <targetArray>. If <targetArray> and <templateArray> have the same set of <keys> but different content in each <element(keyword)>, the <union> <command> does not change the value of <targetArray>.
80
+
The recursively adverb controls whether the intersection recurses through nested arrays or
81
+
not.
82
+
83
+
The <union> <command> combines <targetArray> and <templateArray>. Each <key> of <targetArray>
84
+
is checked to see whether there is already an <element(keyword)> with that <key> in
85
+
<templateArray>. If there is, that <element(keyword)> of <targetArray> is unchanged. If not,
86
+
the corresponding <element(keyword)> of the <templateArray> is placed in <targetArray>.
87
+
88
+
After the <union> <command> is <execute|executed>, the <keys> of <targetArray> consists of
89
+
the logical union of the <keys> of the original <targetArray> and the keys of <templateArray>.
90
+
91
+
The content of individual elements of the <templateArray> does not control the final result.
92
+
Only which <element(glossary)|elements> exist in the <templateArray>, not their content,
93
+
controls which <element(glossary)|elements> of the <templateArray> are placed in <targetArray>.
94
+
If <targetArray> and <templateArray> have the same set of <keys> but different content in
95
+
each <element(keyword)>, the <union> <command> does not change the value of <targetArray>.
0 commit comments