<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/11/5f963c7ed269cdd4ed0e0979ee211090"
  from="Dustin Sallings &lt;dustin@s...&gt;"
  author="Dustin Sallings"
  date="2003-11-17T21:48:23"
  subject="Re: [Caml-list] Closure &amp; Ref"
  prev="2003/11/46312cc55957d6ec48f8b0439fb04d84"
  next="2003/11/db0d9c3e2f8bd31fba3e04524605334f"
  prev-in-thread="2003/11/c62502b67c01192d18d301d00e9d2b31"
  prev-thread="2003/11/496b39537f731229ef7c3864e45156c0"
  next-thread="2003/11/4d893cc52b22fe3904f8f579fcf78b2d"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Closure &amp; Ref">
<msg 
  url="2003/11/398e682363175b0a71bf952390df0eae"
  from="chris.danx &lt;chris.danx@n...&gt;"
  author="chris.danx"
  date="2003-11-17T19:32:44"
  subject="[Caml-list] Closure &amp; Ref">
<msg 
  url="2003/11/32f0890d60db507d62ab7a73dcdc1e62"
  from="Brian Hurt &lt;bhurt@s...&gt;"
  author="Brian Hurt"
  date="2003-11-17T20:44:47"
  subject="Re: [Caml-list] Closure &amp; Ref">
<msg 
  url="2003/11/46312cc55957d6ec48f8b0439fb04d84"
  from="chris.danx &lt;chris.danx@n...&gt;"
  author="chris.danx"
  date="2003-11-17T21:30:04"
  subject="Re: [Caml-list] Closure &amp; Ref">
</msg>
</msg>
<msg 
  url="2003/11/c62502b67c01192d18d301d00e9d2b31"
  from="Dustin Sallings &lt;dustin@s...&gt;"
  author="Dustin Sallings"
  date="2003-11-17T21:02:39"
  subject="Re: [Caml-list] Closure &amp; Ref">
<msg 
  url="2003/11/5f963c7ed269cdd4ed0e0979ee211090"
  from="Dustin Sallings &lt;dustin@s...&gt;"
  author="Dustin Sallings"
  date="2003-11-17T21:48:23"
  subject="Re: [Caml-list] Closure &amp; Ref">
</msg>
</msg>
</msg>
</thread>

<contents>

On Nov 17, 2003, at 13:02, Dustin Sallings wrote:

&gt;&gt; let prodAdd x =
&gt;&gt;    let value = ref x in
&gt;&gt;       fun y -&gt; !value + y;;
&gt;
&gt; 	This is very similar to
&gt;
&gt; let prodAdd x y = x + y;;
&gt;
&gt; 	The only difference is that I'm making a reference with the value of 
&gt; x.

	I don't know what happened to this sentence.  It should read something 
more like, ``The only difference is that you're making a reference with 
the value of x unnecessarily.''

-- 
Dustin Sallings

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

