MapIndexed
MapIndexed(f, expr)applies
fto each part on the first level ofexprand appending the elements position as a list in the second argument.
MapIndexed(f, expr, levelspec)applies
fto each level specified bylevelspecofexprand appending the elements position as a list in the second argument.
Examples
>> MapIndexed(f, {{{{a, b}, {c, d}}}, {{{u, v}, {s, t}}}}, 2){f({f({{a,b},{c,d}},{1,1})},{1}),f({f({{u,v},{s,t}},{2,1})},{2})}Implementation status
- ✅ - full supported