**Abstract** This is just a learning exercise for me. I am trying to create a function that will take a list of vectors, multiply them by a constant if constant is given, and then add all vectors. If we have no constants then the list looks like this: `{list1, list2,...}`

. However if we want to scale one or more vectors the list would look like this: `{{c1,list}, {c2,list}}`

. I can get it to work with one list whether it has a constant or not but not for a list of lists.

`u = {1, -2}; v = {2, -5}; c1 = 4; c2 = -3; vec1 = {u, c1}; vec2 = {c2, v}; ReplaceAll[{vec1, vec2}, {x_List, c_} -> c x] (* gives wrong values *) vec1 /. {x_List, c_} -> c*x (* this works but not if x_List and c_ reordered *) {c1*u, c2*v} (* this is the value I am seeking *) `