Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Curried form different from "normal"
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Baelde <david.baelde@g...>
Subject: Re: [Caml-list] Curried form different from "normal"

Your statement is true only for purely functional definitions. Here,
there is a difference. The following piece of code is evaluated only
one, at the time of the outermost definition. So trailing is
instantiated only once.

>       if !is_first then
>         trailling:=Buffer.contents white
>       else
>         Buffer.add_buffer buf white;
>       Buffer.reset white;
>       is_first:=false;

This kind of effect is sometimes expected, however.

Have fun.