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
A multiple assignment syntax can be used to assign multiple variables to the tuple’s items, by surrounding the variable names with parenthesis and separating each variable name by a comma. The number of variables assigned cannot differ from the number of items in the tuple.
2613
+
A multiple assignment syntax can be used to assign multiple variables to the tuple’s items, by surrounding the variable names with U+0028 LEFT PARENTHESIS and U+0029 RIGHT PARENTHESIS, and separating each variable name with U+002C (,). The number of variables assigned cannot differ from the number of items in the tuple.
For notational convenience, a literal syntax can be used to express lists, by surrounding the list with U+00AB («) and U+00BB (»), and separating its items with U+002C (,).\
5976
+
</p>
5977
+
5978
+
<p>
5970
5979
~list用の~indexing構文も利用できる
5971
5980
— そのためには、
5972
5981
角括弧( [, ] )の内側に 0 番から数える~indexを供する。
5973
5982
~indexは,`存在-$について~~述べる場合を除いて,~~範囲を超えられない。
5974
5983
◎
5975
-
For notational convenience, a literal syntax can be used to express lists, by surrounding the list by « » characters and separating its items with a comma. An indexing syntax can be used by providing a zero-based index into a list inside square brackets. The index cannot be out-of-bounds, except when used with exists.
5984
+
An indexing syntax can be used by providing a zero-based index into a list inside square brackets. The index cannot be out-of-bounds, except when used with exists.
5976
5985
</p>
5977
5986
5978
5987
<pclass="example" id="example-list-notation">
5979
5988
%例 として`~list$
5980
5989
« `a^l, `b^l, `c^l, `a^l »
5981
5990
が与えられた下では、
5982
-
%例[1] は `文字列$ `b^l を表す。
5991
+
%例[ 1 ] は `文字列$ `b^l を表す。
5983
5992
◎
5984
5993
Let example be the list « "a", "b", "c", "a" ». Then example[1] is the string "b".
For notational convenience, a multiple assignment syntax may be used to assign multiple variables to the list’s items, by surrounding the variables to be assigned by « » characters and separating each variable name with a comma. The list’s size must be the same as the number of variables to be assigned. Each variable given is then set to the value of the list’s item at the corresponding index.
6020
+
For notational convenience, a multiple assignment syntax may be used to assign multiple variables to the list’s items, by surrounding the variables to be assigned with U+00AB («) and U+00BB (») (same as lists), and separating each variable name with U+002C (,). The list’s size must be the same as the number of variables to be assigned. Each variable given is then set to the value of the list’s item at the corresponding index.
Some lists are designated as queues. A queue is a list, but conventionally, the following operations are used to operate on it, instead of using append, prepend, or remove.
A literal syntax can be used to express ordered maps, by surrounding the ordered map with «[ ]» characters, denoting each of its entries as key → value, and separating its entries with a comma.
7457
+
A literal syntax can be used to express ordered maps, by starting an ordered map with U+00AB («) and U+005B ([), ending it with U+005D (]) and U+00BB (»), separating each entry’s key and value with U+2192 (→), and separating its entries with U+002C (,).
7458
+
7459
+
by surrounding the ordered map with «[ ]» characters, denoting each of its entries as key → value, and separating its entries with a comma.
A tuple is a struct whose items are ordered. For notational convenience, a literal syntax can be used to express tuples, by surrounding the tuple with parenthesis and separating its items with a comma. To use this notation, the names need to be clear from context. This can be done by preceding the first instance with the name given to the tuple. An indexing syntax can be used by providing a zero-based index into a tuple inside square brackets. The index cannot be out-of-bounds.
7966
+
A tuple is a struct whose items are ordered. For notational convenience, a literal syntax can be used to express tuples, by surrounding the tuple with parentheses and separating its items with U+002C (,). To use this notation, the names need to be clear from context. This can be done by preceding the first instance with the name given to the tuple. An indexing syntax can be used by providing a zero-based index into a tuple inside square brackets. The index cannot be out-of-bounds.
0 commit comments