I would like to replicate the following python function in lua/torch.
def add_and_multiply(a,b):
c=a+b;
d=a*b;
return c,d
How can I return two values simultaneously in lua/torch as above? Also, suppose a and b were matrices(with appropriate dimensions), how would the code change for torch?