caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Constructors are not functions
@ 2009-10-06 12:01 Chantal KELLER
  2009-10-06 12:19 ` [Caml-list] " Philippe Wang
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Chantal KELLER @ 2009-10-06 12:01 UTC (permalink / raw)
  To: caml-list

    Dear Ocaml users,

  Is there a reason for constructors not to behave like functions? For
instance, one cannot make a partial application from a constructor:

# type foo = | Bar of int;;
type foo = Bar of int
# let foobar = Bar in foobar 17;;
Error: The constructor Bar expects 1 argument(s),
       but is applied here to 0 argument(s)

  Thanks,
-- 
Chantal KELLER


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2009-10-10 11:49 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-06 12:01 Constructors are not functions Chantal KELLER
2009-10-06 12:19 ` [Caml-list] " Philippe Wang
2009-10-06 12:38   ` Jon Harrop
2009-10-06 13:38     ` Richard Jones
2009-10-10 11:49     ` blue storm
2009-10-06 12:45 ` David Allsopp
2009-10-06 12:46   ` David Allsopp
2009-10-06 13:14   ` Jim Farrand
2009-10-06 13:51     ` Michel Mauny
2009-10-06 13:15   ` Jon Harrop
2009-10-06 14:04     ` David Allsopp
2009-10-06 14:51       ` Jon Harrop
2009-10-06 15:24       ` Richard Jones
2009-10-06 16:31         ` Jacques Garrigue
2009-10-08 12:37       ` Goswin von Brederlow
2009-10-09  6:29         ` David Allsopp
2009-10-10  6:16           ` Goswin von Brederlow
2009-10-06 13:18 ` Gerd Stolpmann
2009-10-06 15:50 ` Jérémie Dimino
2009-10-06 21:55   ` blue storm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).