part functions



Is there a part function that can map a function on to the selected
part?
For example:
given (z+2)/(z+1)^2
u:expand(part(d1,2))
substpart(u,d1,2)

requires me to specify the part twice, when its the same part.
I would like to be able to say

hackpart('expand,d1,2) and have expand mapped to the part in place.
Does this function exist, and what would it take to make work.
Dan Stanger