English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Constructors are not functions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-10-10 (11:49)
From: blue storm <bluestorm.dylc@g...>
Subject: Re: [Caml-list] Constructors are not functions
On Tue, Oct 6, 2009 at 2:38 PM, Jon Harrop <jon@ffconsultancy.com> wrote:
> Can you not just say that Bar in an expression is a function (fun x -> Bar x)?

Ocaml has a "recursive definition of values" extension that make
syntaxic distinctions between constructors and functions even in an
expression context :
http://caml.inria.fr/pub/docs/manual-ocaml/manual021.html#toc70 .