title: Finding closest match in collection of numbers
body: <p>So I got asked today what was the best way to find the closes match within a collection.</p>
  
  <p>For example, you've got an array like this:</p>
  
  <pre><code>1, 3, 8, 10, 13, ...
  </code></pre>
  
  <p>What number is closest to 4?</p>
  
  <p>Collection is numerical, unordered and can be anything. Same with the number to match.</p>
  
  <p>Lets see what we can come up with, from the various languages of choice.</p>