Enumerate - Maple Help

ListTools

 Enumerate
 enumerate the operands of a list

 Calling Sequence Enumerate(L) Enumerate(L, n)

Parameters

 L - lists n - algebraic expression

Description

 • The Enumerate(L) function converts the list into a list of lists, where each sublist has as its first operand the position of the original operand, and the second argument is that operand itself.
 • The Enumerate(L, n) function starts the enumeration at the value n.

Examples

 > $\mathrm{with}\left(\mathrm{ListTools}\right):$
 > $L≔\left[0.,0.84,0.91,0.14,-0.76,-0.96,-0.28,0.41,-0.54\right]$
 ${L}{≔}\left[{0.}{,}{0.84}{,}{0.91}{,}{0.14}{,}{-0.76}{,}{-0.96}{,}{-0.28}{,}{0.41}{,}{-0.54}\right]$ (1)
 > $\mathrm{Enumerate}\left(L\right)$
 $\left[\left[{1}{,}{0.}\right]{,}\left[{2}{,}{0.84}\right]{,}\left[{3}{,}{0.91}\right]{,}\left[{4}{,}{0.14}\right]{,}\left[{5}{,}{-0.76}\right]{,}\left[{6}{,}{-0.96}\right]{,}\left[{7}{,}{-0.28}\right]{,}\left[{8}{,}{0.41}\right]{,}\left[{9}{,}{-0.54}\right]\right]$ (2)
 > $\mathrm{Enumerate}\left(L,0\right)$
 $\left[\left[{0}{,}{0.}\right]{,}\left[{1}{,}{0.84}\right]{,}\left[{2}{,}{0.91}\right]{,}\left[{3}{,}{0.14}\right]{,}\left[{4}{,}{-0.76}\right]{,}\left[{5}{,}{-0.96}\right]{,}\left[{6}{,}{-0.28}\right]{,}\left[{7}{,}{0.41}\right]{,}\left[{8}{,}{-0.54}\right]\right]$ (3)