Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Closure & Ref
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dustin Sallings <dustin@s...>
Subject: Re: [Caml-list] Closure & Ref

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

>> let prodAdd x =
>>    let value = ref x in
>>       fun y -> !value + y;;
>
> 	This is very similar to
>
> let prodAdd x y = x + y;;
>
> 	The only difference is that I'm making a reference with the value of 
> 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