title: how to populate existing list / array
body: <p>I am new at reason / ocaml / functional programming.</p>
  
  <p>I know about <code>List.append</code> and <code>[] @ []</code> but these functions will create new list but how to populate existing list / array?</p>
  
  <ol>
  <li>What is the best way to populate list?</li>
  <li>What is the best way to populate array? Means if coords type is <code>let coords: array point = [];</code></li>
  <li>Or this is wrong flow (algorithm) for such case?</li>
  </ol>
  
  <p>Reason code:</p>
  
  <pre><code>type point = {x: int, y: int};
  
  let coords: list point = [];
  
  let append raw =&gt;
    Array.iter
      (
        fun data =&gt; {
          let p = {x: data.x, y: data.y};
          /* how to append p to coords */
          ()
        }
      )
      raw;
  </code></pre>
  
  <p>JS analogue:</p>
  
  <pre><code>const coords = [];
  const append = raw =&gt; raw.forEach({x, y} =&gt; {
    coords.push({
      x: process(x),
      y: process(y)
    });
  });
  </code></pre>