Please Help Eliminate My Ignorance
- To: mathgroup at smc.vnet.net
- Subject: [mg118542] Please Help Eliminate My Ignorance
- From: Michael Mandelberg <mmandelberg at comcast.net>
- Date: Mon, 2 May 2011 06:52:02 -0400 (EDT)
Why does Mathematica like the first, but not the second? 1. Clear[x, testp, p]; test[p_] := Append[p, p[[4]]]; 2. Clear[x, testp, p]; test[p_] := x = 1; Append[p, p[[4]]]; Part::partd: Part specification p[[4]] is longer than depth of object. >> Append::normal: Nonatomic expression expected at position 1 in Append[p,p[[4]]]. >>