I am writing a script where I need many variables and for ease of usage I denote them as f[k,l,m,n]. I create a list of 4-tuples with the integers I need and I call these values using f@@{k,l,m,n}.
My problem is that I also need to assign values but writing f@@{k,l,m,n}=1 returns an error, declaring that the Tag Apply is protected. Is there any way to overcome this or do I need to assign my values using f[k,l,m,n]=1?
Do[Set[Evaluate[f @@ t], g[t]], {t, tuples}]in a loop, whatever the valuesgare ... – BoLe Jul 11 '16 at 13:35TraceScan[# /. _[expr_] :> Unset[expr] &, f @@ {k, l, m, n}] // Quiet(but this is actually terrible) – vapor Jul 11 '16 at 13:45