title: Generating all distinct permutations of a list in R
body: <p>I'm trying to create a list of permutations of a list, such that, for example, <code>perms(list("a", "b", "c"))</code> returns </p>
  
  <pre><code>list(list("a", "b", "c"), list("a", "c", "b"), list("b", "a", "c"),
       list("b", "c", "a"), list("c", "a", "b"), list("c", "b", "a"))
  </code></pre>
  
  <p>I'm not sure how to proceed, any help would be greatly appreciated.</p>