Difference between revisions of "Reverse Command"

From GeoGebra Manual
Jump to: navigation, search
(command syntax: changed [ ] into ( ))
Line 1: Line 1:
 
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|list}}
 
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|list}}
;Reverse[ &lt;List> ]:Reverses the order of a [[Lists|list]].
+
;Reverse( &lt;List> ):Reverses the order of a [[Lists|list]].
:{{example|1=<br><code><nowiki>Reverse[list1]</nowiki></code> reverses <code>list1 = {(1, 2), (3, 4), (5, 6)}</code> to create ''list2 = {(5, 6), (3, 4), (1, 2)}''}}
+
:{{example|1=<br><code><nowiki>Reverse(list1)</nowiki></code> reverses <code>list1 = {(1, 2), (3, 4), (5, 6)}</code> to create ''list2 = {(5, 6), (3, 4), (1, 2)}''}}
 
==CAS Syntax==
 
==CAS Syntax==
;Reverse[ &lt;List> ]:Reverses the order of a [[Lists|list]].
+
;Reverse( &lt;List> ):Reverses the order of a [[Lists|list]].
:{{example|1=<br><code><nowiki>Reverse[{1, 2, 3, 4}]</nowiki></code> reverses the list to create ''{4, 3, 2, 1}''}}
+
:{{example|1=<br><code><nowiki>Reverse({1, 2, 3, 4})</nowiki></code> reverses the list to create ''{4, 3, 2, 1}''}}

Revision as of 11:28, 6 October 2017


Reverse( <List> )
Reverses the order of a list.
Example:
Reverse(list1) reverses list1 = {(1, 2), (3, 4), (5, 6)} to create list2 = {(5, 6), (3, 4), (1, 2)}

CAS Syntax

Reverse( <List> )
Reverses the order of a list.
Example:
Reverse({1, 2, 3, 4}) reverses the list to create {4, 3, 2, 1}
© 2024 International GeoGebra Institute