# Is there a way to extract an element from a list of functions, before evaluating the numerical value of the function element in Mathematica?

Consider a list of functions

M[x_]:={Cos[x], Sin[x], x}


Say I want to evaluate the first element

M[]


What Mathematica does is evaluate the entire list at x=1 then extracts the first element Cos. For large list and complicated functions, this is costly as I don't need the rest of the list's elements(for now). Is there a way where I can make Mathematica extract the first element first, then evaluate it at x=1 instead of the other way around?

## migrated from math.stackexchange.comJun 18 '18 at 10:11

This question came from our site for people studying math at any level and professionals in related fields.

ClearAll[m, m2]


Turn your already defined function that returns a list

m[x_] := {Cos[x], Sin[x], x}


to a list of functions:

m2 = Function /@ m[#];


Extract any part using Part ([[.]]) and use it with the desired input:

m2[][z]


Sin[z]

m2[][whatever]


whatever