Editing PEGWiki:Notational conventions
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 43: | Line 43: | ||
* A ''list'' is written like a set but with square brackets, <math>[\,]</math>. It is an ordered collection of elements of the same type. A list is like a set in that its size is not fixed but elements can be added and removed. It is like a tuple in that two lists are considered equal if and only if they are of the same size and all pairs of corresponding elements are equal. Hence, <math>[1,2,3] \neq [1,3,2]</math>, as their elements are in different orders. | * A ''list'' is written like a set but with square brackets, <math>[\,]</math>. It is an ordered collection of elements of the same type. A list is like a set in that its size is not fixed but elements can be added and removed. It is like a tuple in that two lists are considered equal if and only if they are of the same size and all pairs of corresponding elements are equal. Hence, <math>[1,2,3] \neq [1,3,2]</math>, as their elements are in different orders. | ||
* Two lists written with a plus sign between them represents the concatenation of the two lists: hence, <math>[1,2] + [3,4] = [1,2,3,4]</math>. Notice that concatenation is noncommutative. | * Two lists written with a plus sign between them represents the concatenation of the two lists: hence, <math>[1,2] + [3,4] = [1,2,3,4]</math>. Notice that concatenation is noncommutative. | ||
− | |||
===Graph theory=== | ===Graph theory=== |