title: Generating an infinite list of Fibonacci sequence in ML
body: <p>I have to generate an infinite list containing a Fibonacci sequence. I am new to ML so I want to check if this is correct.</p>
  
  <pre><code>-datatype 'a infist=NIL
  =           | CONS of 'a * (unit -&gt; 'a inflist);
  - fun fib a b = CONS (a , fn()=&gt; fib b (a+b));
  val fib=fn: int-&gt;int-int inflist
  </code></pre>
  
  <p>Is this what is called a generator function?
  Will it give me an actual output i.e the infinite fib sequence when I give a and b inputs?</p>