From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id 0F7947EDD3 for ; Thu, 4 Oct 2012 15:14:00 +0200 (CEST) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.223.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail1-smtp-roc.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.223.182 as permitted sender) identity=mailfrom; client-ip=209.85.223.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ie0-f182.google.com) identity=helo; client-ip=209.85.223.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-ie0-f182.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtMBAJ2KbVDRVd+2m2dsb2JhbABFrQiReggjAQEBAQEICQsJFCeCIAEBAQQSAhMZARsSCwEDDAYFCw0NISIBEQEFAQoSGQgKEIdQAQMPC5omCQOMJYJ1hQcKGScDClmIdQEFDIsXgnyDIAOVaYEVjTcWKYQP X-IronPort-AV: E=Sophos;i="4.80,535,1344204000"; d="scan'208";a="175800535" Received: from mail-ie0-f182.google.com ([209.85.223.182]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 04 Oct 2012 15:13:59 +0200 Received: by mail-ie0-f182.google.com with SMTP id k10so1596356iea.27 for ; Thu, 04 Oct 2012 06:13:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=74AEfsuUcwEF0vB2C/ubm9CnEa40jsKHRG+bzz3lU2Y=; b=KYhEcmOwUFu9YO5Sj/Dt7inolrMyXviK9mpkh5JgLJJmQyzePaD/4PqPVccm6ZLIqc bZO9umYZlND/vFh/9SAqSLa10ECn61xNRt6Kt2FDSN8/M/E4nbut3ONzUlw/Utn8fz5V edGio++MIpP8/aoE617AfNWNgVxcFa+pmcDWpdFmx/6RMfdmhwTSlu7Q56/VKX1KSWPs ZNe7xhsOmGMPvYHiMcPpU4uIw+gzDJBpnF6aa89oAbBo99jMZHCW3L0Mm9QyDeS7j/gL mVqIJn30RWnWVmIRp1gwm5kdvEJ3QtC7OZoelOT5McOWXakSb8c6F1QN4cYhgDHyMe4n +P9w== Received: by 10.43.134.70 with SMTP id ib6mr4193105icc.37.1349356434035; Thu, 04 Oct 2012 06:13:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.194.202 with HTTP; Thu, 4 Oct 2012 06:13:13 -0700 (PDT) In-Reply-To: <20121004130310.GA20285@securactive.lan> References: <20121004130310.GA20285@securactive.lan> From: Gabriel Scherer Date: Thu, 4 Oct 2012 15:13:13 +0200 Message-ID: To: rixed@happyleptic.org Cc: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Caml-list] keeping parameter polymorphic Hi, See the following FAQ item: "How to write a function with polymorphic arguments?" http://caml.inria.fr/resources/doc/faq/core.en.html#polymorphic-arguments On Thu, Oct 4, 2012 at 3:03 PM, wrote: > 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). > > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs