I want
f[{1,2.}]
to give
{2,4.}
These don't work:
f[v:{__Integer}] f[v:{__Number}], f[v:{__Real || Integer}]
Sometimes "__" doesn't print in the Post Preview
Forgot to add:
triple period (...) will also except an empty list: { }
I think this is what you want:
f[v : {(_Real | _Integer) ..}] := 2 v
Note the use of Repeated (..), and a single | (called Alternative).
this will accept a list of integers/reals