title: Is there any functional difference between Array.replicate and Array.create in F#?
body: <p>I was refactoring some code and noted that some coders used <code>Array.replicate</code> and other <code>Array.create</code> when initializing an array with repeatedly the same value. The signatures of both functions are identical:</p>
  
  <pre><code>&gt; Array.create;;
  val it : (int -&gt; 'a -&gt; 'a [])
  
  &gt; Array.replicate;;
  val it : (int -&gt; 'a -&gt; 'a [])
  </code></pre>
  
  <p>I also noted that both raise an <code>ArgumentException</code> on a negative <code>count</code> value, and both allow a count of zero. My gut tells me they are synonymous, but then I found this quote on <a href="https://fsharpforfunandprofit.com/posts/list-module-functions/#5-creating-a-new-collection-of-known-size-with-each-element-having-the-same-value" rel="nofollow noreferrer">F# For Fun And Profit</a>:</p>
  
  <blockquote>
    <p><em>Array.create is basically the same as replicate (although with a subtly different implementation!) but replicate was only implemented for Array in F# v4.</em></p>
  </blockquote>
  
  <p>Is anybody aware of what differences exist, or are they, for all intents and purposes, aliases of one another (perhaps <code>replicate</code> was merely added for parity with <code>seq</code>)?</p>