I'll try to make this question more clear in a little while. In the mean time, I'll ask directly the question which motivated it: Latin Square from submatrix
Original Question
I want, for instance, to obtain the code
{#[[1]],
#2[[1]],
#3[[1]],
...
#999[[1]]}
and I'm not sure how to do it. If I run
Activate[Part[Inactive[Slot][#], 2] & /@ Range@999]
I get what I want, since Slot[n] has no second part. How do I get the input code for a part of an expression that may or may not exist without having it wrapped or inactive?
This problem arose when writing code to solve for missing matrix entries; each missing entry got assigned a numbered Slot. I may type this specific example up, but in the mean time here's a contrived example:
thelist=Table[#[[i]],{i,10}]&
(*Out[]={1,i[[2]],i[[3]],...,i[[10]]}*)
The desired output is
(*Out[]={i[[1]],i[[2]],i[[3]],...,i[[10]]}*)
Indexedhave the effect you want? $\endgroup$Partin a later piece of code to extract elements, I just don't want to manually type it. $\endgroup$