I came across this case:
expr = {x, Cos[Exp[x]], x^a}
Cases[expr, Power[__], -1]
(*{x,E,x,E^x,Cos[E^x],x,a,x^a}*)
Level[expr, -1]
(*{x,E,x,E^x,Cos[E^x],x,a,x^a}*)
What is going on here? Why Power[__]
(or Power[_]
) Works like Level?
Thanks