The minimal working example of my problem is as follows:
l = {1, 2, 3, 4}
f[a_, b_, c_, d_] = a + b + c + d
Now, I'd like to evaluate
f[l[[1]],l[[2]],l[[3]],l[[4]]]
, but with a syntax like f[Unwrap[l]].
I don't have access to the code of 'f', and I can't simply change the way it is defined to accept a list
Basically, I am missing the functionality present in Python with the *,
l=[0,1,2,3]
def f(a,b,c,d):
return a+b+c+d
print f(*l)
list = {1, 2, 3, 4}; f[a_, b_, c_, d_] = a + b + c + d; f[Sequence @@ list]? – Dr. belisarius Jul 08 '13 at 18:36Operatebased answer. – Kuba Jul 08 '13 at 19:15