Hello everyone,
I'm trying to define a Function, which changes the Head of an Expression to be List. i.e.: $$ f[a,b,c,d,e] \mapsto List[a,b,c,d,e] $$ I found a way to change Plus into List, but it's quite long:
chang[var__] := ToExpression[ StringReplacePart[ToString[FullForm[var]], "List", {1, 4(Plus has 4 letters)}]]
Can you think of doing this in a more general & elegant way for arbitrary Head f? Thank you for your reply,
Best regards, Josip