3
$\begingroup$

I am trying to generate a 2 tuple using maple. Can anyone give me the command to generate this? Thank you very much.

$\endgroup$

1 Answer 1

2
$\begingroup$

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 use x and y 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?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.