I have a huge list with huge sublists of the form
list={{a,b,c,d},{e,f,g,h},{i,j,k,l}}
I am looking for a way to manipulate these sublists based on the positions of the elements. Something like
list/.{j_,k_,l_,m_}->{j-1,k,l,m}
but without having to write the whole pattern. Is there any way to specify such manipulation based on the position of the element? Something like
list/.#[[1]] & -> #[[1]] - 1 &
that would work?
f[l_List] := {First@l - 1, Sequence @@ Rest@l}; f /@ list
? $\endgroup$Length@myoriginallist
outputs 81 for all $\endgroup$