caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] keeping parameter polymorphic
@ 2012-10-04 13:03 rixed
  2012-10-04 13:13 ` Gabriel Scherer
  0 siblings, 1 reply; 2+ messages in thread
From: rixed @ 2012-10-04 13:03 UTC (permalink / raw)
  To: caml-list

Hello.
I can't find a way to keep f polymorphic in:

let test f = f 1, f true

that I'd like to return a int*bool from any function 'a->'a

I now this question regularly pops up, but I've tried many combinations
of "(type a)" and "'a." to no avail (ocaml 3.12.1 here).

(in real world, my function takes a generic "fold" function that I'd
like to use with various types).


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

end of thread, other threads:[~2012-10-04 13:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-04 13:03 [Caml-list] keeping parameter polymorphic rixed
2012-10-04 13:13 ` Gabriel Scherer

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).