Problem. I work with a list and want to get the first element. For specific reasons I want to use # in combination with Map
For example
data = {{1, 1, 1}, {2, 1, 2}, {1, 2, 3}, {3, 1, 4}, {1, 3, 5}};
the desired output is {1, 1, 1}
a simple way to do is using First like
First[data]
But I want to use # in combination of /@
When I use
#[[1]] & /@ lijst
the output is
{1, 2, 1, 3, 1}
The desired output is
{1, 1, 1}
Who has a suggestion
#[[1]] &@data
or# & @@ data
? $\endgroup$Map
, try#[[1]] & /@ Transpose[data]
$\endgroup$