 mutable - Maple Help

convert/mutable

convert an expression to a mutable data structure Calling Sequence convert(expr, mutable) Parameters

 expr - expression Description

 • The convert(expr, mutable) calling sequence converts the expression expr to a mutable object.
 • The following conversions are performed:
 Expressions which are already mutable objects are left as is.
 Expressions of type list are converted to Arrays.
 Expressions of type set are converted to MutableSets.
 Expressions of type string are converted to ByteArrays. Examples

 > $\mathrm{convert}\left(\left[2,4,6\right],\mathrm{mutable}\right)$
 $\left[\begin{array}{ccc}{2}& {4}& {6}\end{array}\right]$ (1)
 > $\mathrm{convert}\left(\left\{2,4,6\right\},\mathrm{mutable}\right)$
 ${\mathrm{MutableSet}}{}\left({2}{,}{4}{,}{6}\right)$ (2)
 > $\mathrm{convert}\left(⟨2,4,6⟩,\mathrm{mutable}\right)$
 $\left[\begin{array}{c}{2}\\ {4}\\ {6}\end{array}\right]$ (3)
 > $\mathrm{convert}\left("hello",\mathrm{mutable}\right)$
 $\left[\begin{array}{ccccc}{104}& {101}& {108}& {108}& {111}\end{array}\right]$ (4) Compatibility

 • The convert/mutable command was introduced in Maple 2022.