How can I make
f[n_Integer]=2*n
valid for a list of integers? For example:
f[nlist_Integer] := 2*nlist[[1]]
does not work because because nlist={1,3,2}
is not an integer.
Edit: Same question with NumericQ
(which does not work as Integer
)?