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

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
>

  reply	other threads:[~2012-09-06  9:49 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 [this message]
2012-09-06 13:19     ` Philippe Wang
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='CAK=fH+hT0MRdFwTxdPu5n1us_8x8sce8t8YVb5k55=h7YW9pqg@mail.gmail.com' \
    --to=dhouse@janestreet.com \
    --cc=caml-list@inria.fr \
    --cc=danbensen@att.net \
    --cc=mail@philippewang.info \
    /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).