I have gone through some reference material but I am not getting really good links that will help me grow understanding of pure functions,patterns and list manipulations combined together
. Most of the examples referred in documentation are for single list(without sublists).
For example, say from a list I wanted to pick first element of every sublist, say,fi = FactorInteger[12]
so I used
Table[fi[[i, 1]], {i, 1, Length[fi]}]
I try to do everything with Table
.
Though it should be achievable via other simple ways too. Can someone please put some examples where one can get to learn how to access data from lists of sublists and how to decompose it. This might sound pretty trivial to lot of people but I couldn't find books and links either that can give insight into combining these Mathematica features together.
fi[[All, 1]]
,First /@ fi
and#[[1]] & /@ fi
would work. $\endgroup$Table
expression can be replaced with# & @@@ fi
. Is that the sort of thing you're interested in? $\endgroup$