From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 816417EE25 for ; Sat, 9 Nov 2013 18:57:11 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jeansaintremy@yahoo.com) identity=pra; client-ip=98.139.213.161; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jeansaintremy@yahoo.com"; x-sender="jeansaintremy@yahoo.com"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jeansaintremy@yahoo.com) identity=mailfrom; client-ip=98.139.213.161; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jeansaintremy@yahoo.com"; x-sender="jeansaintremy@yahoo.com"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@nm24-vm0.bullet.mail.bf1.yahoo.com) identity=helo; client-ip=98.139.213.161; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jeansaintremy@yahoo.com"; x-sender="postmaster@nm24-vm0.bullet.mail.bf1.yahoo.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjMDAMl2flJii9WhlWdsb2JhbABMDYJDfFMIrDmSWIEsFg4BAQEBBw0JCRIqgiABBAEBBQscBBUBAhUVAQsBAQ4GBQQUDSEvAQ4BBhIGExKFN4IZDAEBAg8Nqw8JgwCEBQEjAwEjA4luAQYKAQEBj1oHhDADh1eBa45UgSiFDjVViG9whCs X-IPAS-Result: AjMDAMl2flJii9WhlWdsb2JhbABMDYJDfFMIrDmSWIEsFg4BAQEBBw0JCRIqgiABBAEBBQscBBUBAhUVAQsBAQ4GBQQUDSEvAQ4BBhIGExKFN4IZDAEBAg8Nqw8JgwCEBQEjAwEjA4luAQYKAQEBj1oHhDADh1eBa45UgSiFDjVViG9whCs X-IronPort-AV: E=Sophos;i="4.93,668,1378850400"; d="scan'208,217";a="34668528" Received: from nm24-vm0.bullet.mail.bf1.yahoo.com ([98.139.213.161]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 09 Nov 2013 18:57:10 +0100 Received: from [98.139.212.150] by nm24.bullet.mail.bf1.yahoo.com with NNFMP; 09 Nov 2013 17:57:08 -0000 Received: from [98.139.212.228] by tm7.bullet.mail.bf1.yahoo.com with NNFMP; 09 Nov 2013 17:57:08 -0000 Received: from [127.0.0.1] by omp1037.mail.bf1.yahoo.com with NNFMP; 09 Nov 2013 17:57:08 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 339240.9876.bm@omp1037.mail.bf1.yahoo.com Received: (qmail 10599 invoked by uid 60001); 9 Nov 2013 17:57:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1384019828; bh=8otyDUdL/x6pXkLMR4m97uCwI2RhFwcfCsFTK7G1jmk=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=b+ZgILRiCCnsU+qvZfxGeDTURor0qdTmI572JDLwkuFzrqau+Qtdy0wXreiv2u6Yf3caENqv+CYbFiMtmwjPETRSoCmKsvKG3VCSgHgwH+UUnMCwn+ldzC6EPLn7H05Mkn+yTZ0P18C1smhpbBzG0K5wD80yy1jGQeNOENe7Tvk= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=xeEheftC7XWmnWUWyHy65NUMot9ctnckT1BPU5XBnJlt6+VyQ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] by web160502.mail.bf1.yahoo.com via HTTP; Sat, 09 Nov 2013 09:57:08 PST X-Rocket-MIMEInfo: 002.001,SGksCgpJJ3ZlIGJlZW4gd29ya2luZyBvdXQgc29tZSBvZiB0aGUgZXhhbXBsZXMgaW4gdGhlIGh0dHBzOi8vcmVhbHdvcmxkb2NhbWwub3JnL3YxL2VuL2h0bWwvYS1ndWlkZWQtdG91ci5odG1sLCB3aGljaCBkb2VzIHV0aWxpemUgSmFuZVN0cmVldCAnY29yZScgbGlicmFyeS4gVGhlIG5ldyBvY2FtbCB3ZWJzaXRlIGlzIHZlcnkgaW1wcmVzc2l2ZSwgYXMgaXQgYWxsb3dzIHlvdSB0byBkaXZlIHJpZ2h0IGluIGludG8gdmVyeSBmYXNjaW5hdGluZyBpZGlvbWF0aWMgb2NhbWwgZXhwcmVzc2lvbnMuIEp1c3QBMAEBAQE- X-Mailer: YahooMailWebService/0.8.163.597 References: <1383968015.11272.YahooMailNeo@web160505.mail.bf1.yahoo.com> <20131109100726.GA4014@kerneis.info> Message-ID: <1384019828.3098.YahooMailNeo@web160502.mail.bf1.yahoo.com> Date: Sat, 9 Nov 2013 09:57:08 -0800 (PST) From: Jean Saint-Remy Reply-To: Jean Saint-Remy To: Gabriel Kerneis Cc: "caml-list@inria.fr" In-Reply-To: <20131109100726.GA4014@kerneis.info> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-1809676440-497726454-1384019828=:3098" Subject: Re: [Caml-list] applying labled argument error ---1809676440-497726454-1384019828=:3098 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi, I've been working out some of the examples in the https://realworldocaml.or= g/v1/en/html/a-guided-tour.html, which does utilize JaneStreet 'core' libra= ry. The new ocaml website is very impressive, as it allows you to dive righ= t in into very fascinating idiomatic ocaml expressions. Just launching ocam= l toplevel though is not enough.=A0 let sum list =3D=20 =A0 let sum=A0 =3D ref 0 in=20 =A0 List.iter list ~f:(fun x -> sum :=3D !sum + x); =A0 !sum ;; -: Error: The function applied to this argument has type 'a list -> unit =A0=A0 This argument cannot be applied with label ~f Jean On Saturday, November 9, 2013 5:07 AM, Gabriel Kerneis wrote: =20 On Fri, Nov 08, 2013 at 07:33:35PM -0800, Jean Saint-Remy wrote: > I am running ocaml 3.12.1 and getting an error message. Is it an incompat= ible > version error or a missing 'core' module? Since you mention 'core', are you learning OCaml with "Real-World OCaml" (a= nd hence trying to use JaneStreet's Core library instead of the standard one)? That would explain the discrepancy you are seeing. Best, --=20 Gabriel --=20 Caml-list mailing list.=A0 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= ---1809676440-497726454-1384019828=:3098 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,

<= span>I've been working out some of the examples in the https://realworldoca= ml.org/v1/en/html/a-guided-tour.html, which does utilize JaneStreet 'core' = library. The new ocaml website is very impressive, as it allows you to dive= right in into very fascinating idiomatic ocaml expressions. Just launching= ocaml toplevel though is not enough. 

let sum list =3D
  let= sum  =3D ref 0 in
  List.iter list ~= f:(fun x -> sum :=3D !sum + x);
  !sum ;;
-: Error: The function applied to this argument has ty= pe 'a list -> unit
   This argument cannot be applied with label ~f

Jean


On Saturday, November 9, 2013 5:07 AM, Gabriel Kerneis <gab= riel@kerneis.info> wrote:
On Fri, Nov 08, 2013 at 07:33:35PM -0800, Jean Saint-Remy wrote:
> I am running ocaml 3.12.1 and getting an error message. I= s it an incompatible
> version error or a missing 'cor= e' module?

Since you mention 'core', a= re you learning OCaml with "Real-World OCaml" (and
hence = trying to use JaneStreet's Core library instead of the standard one)?
= That would explain the discrepancy you are seeing.


Best,

--
Gabriel

--
Caml-list mailing list.  Subscription man= agement and archives:
https://sympa.inria.fr= /sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug re= ports: http://caml.inria.fr/bin/caml-bugs



= ---1809676440-497726454-1384019828=:3098--