caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Philippe Wang <mail@philippewang.info>
To: David House <dhouse@janestreet.com>
Cc: Dan Bensen <danbensen@att.net>, caml-list@inria.fr
Subject: Re: [Caml-list] polymorphic parameters
Date: Thu, 6 Sep 2012 15:19:16 +0200	[thread overview]
Message-ID: <CAAFfW_p7toRofLS-GVHgPj7_AckmgrhkGArdQQURvUBOiZ+A6w@mail.gmail.com> (raw)
In-Reply-To: <CAK=fH+hT0MRdFwTxdPu5n1us_8x8sce8t8YVb5k55=h7YW9pqg@mail.gmail.com>

You're right, I misread the question!
(I missed one word, which changed the semantics of the question)

On Thu, Sep 6, 2012 at 11:49 AM, David House <dhouse@janestreet.com> wrote:
> Careful: that doesn't actually ensure polymorphism. See:
>
> https://ocaml.janestreet.com/?q=node/79
>
> On Thu, Sep 6, 2012 at 10:35 AM, Philippe Wang <mail@philippewang.info> wrote:
>> On Thu, Sep 6, 2012 at 11:20 AM, Dan Bensen <danbensen@att.net> wrote:
>>> How do you indicate that a function parameter is a polymorphic function?
>>
>> I hope these 2 lines will answer your question:
>>
>> let f g x = g x
>>
>> let f (g: 'a -> 'b) x = g x
>>
>> --
>> Philippe Wang
>>    mail@philippewang.info
>>
>> --
>> Caml-list mailing list.  Subscription management and archives:
>> https://sympa-roc.inria.fr/wws/info/caml-list
>> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
>> Bug reports: http://caml.inria.fr/bin/caml-bugs
>>



-- 
Philippe Wang
   mail@philippewang.info

  reply	other threads:[~2012-09-06 13:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-06  9:20 Dan Bensen
2012-09-06  9:35 ` Philippe Wang
2012-09-06  9:49   ` David House
2012-09-06 13:19     ` Philippe Wang [this message]
2012-09-06  9:55   ` Gabriel Scherer
2012-09-06  9:59     ` Gabriel Scherer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAFfW_p7toRofLS-GVHgPj7_AckmgrhkGArdQQURvUBOiZ+A6w@mail.gmail.com \
    --to=mail@philippewang.info \
    --cc=caml-list@inria.fr \
    --cc=danbensen@att.net \
    --cc=dhouse@janestreet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).