I am trying to generate a 2 tuple using maple. Can anyone give me the command to generate this? Thank you very much.
1 Answer
$\begingroup$
$\endgroup$
What do you mean by a 2-tuple? If the two values you want to put into it are called x
and y
, then you can create a
- sequence as
x, y
- list as
[x, y]
- set as
{x, y}
- Vector as
<x, y>
- Array as
Array([x, y])
- table as e.g.
table([1 = x, 2 = y])
(or use something else as keys - or usex
andy
as keys and something else as values) - record as e.g.
Record(x, y)
- mutable set as
MutableSet(x, y)
(I don't believe this is documented, so you're on your own for forward compatibility) - deque as
DEQueue(x, y)
(same remarks as for the mutable set) - unevaluated function call as e.g.
f(x, y)
Each of these can be used as a 2-tuple (with some fantasy). What do you want to do with the tuple?