Difference between revisions of "Join Command"

From GeoGebra Manual
Jump to: navigation, search
(added v4 - note and examples formatting)
(added v4 - note and examples formatting)
Line 3: Line 3:
 
; Join[List 1, List 2, ...]: Joins the two (or more) lists.
 
; Join[List 1, List 2, ...]: Joins the two (or more) lists.
 
:{{Note| The new list contains all elements of the initial lists even if they are the same. The elements of the new list are not re-ordered.}}
 
:{{Note| The new list contains all elements of the initial lists even if they are the same. The elements of the new list are not re-ordered.}}
: {{Example| <tt>Join[{5, 4, 3}, {1, 2, 3}]</tt> creates the list ''{5, 4, 3, 1, 2, 3}''.}}
+
: {{Example| <code>Join[{5, 4, 3}, {1, 2, 3}]</code> creates the list ''{5, 4, 3, 1, 2, 3}''.}}
  
 
; Join[List of lists]: Joins the sub-lists into one longer list.
 
; Join[List of lists]: Joins the sub-lists into one longer list.
 
: {{Note| The new list contains all elements of the initial lists even if they are the same. The elements of the new list are not re-ordered.}}
 
: {{Note| The new list contains all elements of the initial lists even if they are the same. The elements of the new list are not re-ordered.}}
 
:{{Example|  
 
:{{Example|  
:* <tt><nowiki>Join[{{1, 2}}]</nowiki></tt> creates the list ''{1, 2}''.
+
:* <code><nowiki>Join[{{1, 2}}]</nowiki></code> creates the list ''{1, 2}''.
:* <tt>Join[{{1, 2, 3}, {3, 4}, {8, 7}}]</tt> creates the list ''{1, 2, 3, 3, 4, 8, 7}''.}}
+
:* <code>Join[{{1, 2, 3}, {3, 4}, {8, 7}}]</code> creates the list ''{1, 2, 3, 3, 4, 8, 7}''.}}

Revision as of 18:14, 23 February 2011


Join[List 1, List 2, ...]
Joins the two (or more) lists.
Note: The new list contains all elements of the initial lists even if they are the same. The elements of the new list are not re-ordered.
Example: Join[{5, 4, 3}, {1, 2, 3}] creates the list {5, 4, 3, 1, 2, 3}.


Join[List of lists]
Joins the sub-lists into one longer list.
Note: The new list contains all elements of the initial lists even if they are the same. The elements of the new list are not re-ordered.
Example:
  • Join[{{1, 2}}] creates the list {1, 2}.
  • Join[{{1, 2, 3}, {3, 4}, {8, 7}}] creates the list {1, 2, 3, 3, 4, 8, 7}.
© 2024 International GeoGebra Institute