Hello,
I would like to use Thread to apply a function on arguments that are lists and arguments which are scalars.
The following behavior is what I am looking for:
blafun1[a_, b_, c_] := a + b + c
Thread[blafun1[a, b, {c1, c2, c3}], List, -1]
{a + b + c1, a + b + c2, a + b + c3}
however, when I use a function that makes use of an If like:
blafun2[a_, b_, c_] := If[a + b + c > 0, a + b + c, 2]
then I get the following result:
If[{a + b + c1, a + b + c2, a + b + c3} > 0, a + b + {c1, c2, c3}, 2]
why is that? And how can I achieve what I want to?
Best Regards, Mathias