Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • 1
    $\begingroup$ Do you need the positions or is something like anl /. a_Symbol :> f[a] /. f[List] :> List acceptable? $\endgroup$ Commented Dec 20, 2015 at 20:57
  • $\begingroup$ @march, I need to operate with leaves of large lists and associations, so positions are not a value in itself. Anyway, Replacement would qualifiy as a useful alternative. $\endgroup$ Commented Dec 20, 2015 at 21:05
  • 3
    $\begingroup$ Is this what you need? l = Map[f, anl, {-1}]; Most /@ Position[l, f]? $\endgroup$ Commented Dec 20, 2015 at 21:06
  • 4
    $\begingroup$ related: 99603 $\endgroup$ Commented Dec 20, 2015 at 21:08
  • 2
    $\begingroup$ @Kuba This one?: mathematica.stackexchange.com/questions/98170/… $\endgroup$ Commented Dec 21, 2015 at 1:15