title: Julia: All possible sums of `n` entries of a Vector with unique integers, (with repetition)
body: <p>Let's say I have a vector of unique integers, for example <code>[1, 2, 6, 4]</code> (sorting doesn't really matter). </p>
  
  <p>Given some <code>n</code>, I want to get all possible values of summing <code>n</code> elements of the set, including summing an element with itself. It is important that the list I get is <em>exhaustive</em>.</p>
  
  <p>For example, for <code>n = 1</code> I get the original set.
  For <code>n = 2</code> I should get all values of summing 1 with all other elements, 2 with all others etc. Some kind of memory is also required, in the sense that I have to know from which entries of the original set did the sum I am facing come from. </p>
  
  <p>For a given, specific <code>n</code>, I know how to solve the problem. I want a concise way of being able to solve it for any <code>n</code>.</p>
  
  <p>EDIT: This question is for Julia 0.7 and above...</p>