Using sequence to complete arguments to a function

I have a function of, say 4 arguments f[a,b,{c,e},d] where some of the arguments are lists. Given a list of triplets that are possible last-three-arguments to f I'd like to paste them as arguments to f as in

Map[f[2, # /. List -> Sequence] &, {{1, {2, -2}, 3}, {0, {2, -2}, 4}, {3, {5, -5}, 7}}]

but this gives me

{f[2, 1, 2, -2, 3], f[2, 0, 2, -2, 4], f[2, 3, 5, -5, 7]}

whereas I wanted

{f[2, 1, {2, -2}, 3], f[2, 0, {2, -2}, 4], f[2, 3, {5, -5}, 7]}

How can I get the result I want?

• Apply to the first level is the best solution (in my opinion) Aug 11, 2020 at 20:39

lst = {{1, {2, -2}, 3}, {0, {2, -2}, 4}, {3, {5, -5}, 7}};

f[2, ##] & @@@ lst

{f[2, 1, {2, -2}, 3], f[2, 0, {2, -2}, 4], f[2, 3, {5, -5}, 7]}


Alternatively,

Apply[f[2, ##] &, lst, 1]
Map[f[2, ## & @@ #] &, lst]
Map[f[2, Sequence @@ #] &, lst]
FlattenAt[f[2, #], 2] & /@ lst
f @@ Prepend[#, 2] & /@ lst
Prepend[f @@ #, 2] & /@ lst

• One more variation for your list: f[2, Delete[#, 0]] & /@ lst. However, I still prefer your very first solution. Aug 19, 2020 at 7:37