title: Reduce array to tuple of first and last element?
body: <p>I have an array that I would like to first sort, then return the first and last element of the sorted array. I thought I can use <code>reduce</code>, but what if I don't have an initial value?</p>
  
  <p>Here is the array I'm trying to work with:</p>
  
  <pre><code>let myNumbers = [4, 9, 6, 2, 3]
  </code></pre>
  
  <p>How can <code>map</code> this to the first and last of the sorted array to this?:</p>
  
  <pre><code>(2, 9)
  </code></pre>