Apply
returns
f(expr)
replaces the head of
expr
withf
.
applies
f
on the parts specified bylevelspec
.
Examples
The head of expr
need not be List
:
Apply on level 1:
The default level is 0:
Range of levels, including negative level (counting from bottom):
Convert all operations to lists:
Level specification x + y is not of the form n, {n}, or {m, n}.
The A001597 Perfect powers: m^k
where m > 0
and k >= 2
Implementation status
- ✅ - full supported