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 EE4F181798 for ; Wed, 10 Jul 2013 15:48:56 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of ivg@ieee.org) identity=pra; client-ip=209.85.215.54; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ivg@ieee.org"; x-sender="ivg@ieee.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of ivg@ieee.org designates 209.85.215.54 as permitted sender) identity=mailfrom; client-ip=209.85.215.54; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ivg@ieee.org"; x-sender="ivg@ieee.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-la0-f54.google.com) identity=helo; client-ip=209.85.215.54; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ivg@ieee.org"; x-sender="postmaster@mail-la0-f54.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjACAHBl3VHRVdc2k2dsb2JhbABasykBkn4WDgEBAQEHCwsJFAQkglETezQBJAEFAYhEBJlbgn6dHZAAg18DiR+OOI9lP4Q8 X-IPAS-Result: AjACAHBl3VHRVdc2k2dsb2JhbABasykBkn4WDgEBAQEHCwsJFAQkglETezQBJAEFAYhEBJlbgn6dHZAAg18DiR+OOI9lP4Q8 X-IronPort-AV: E=Sophos;i="4.87,1036,1363129200"; d="scan'208";a="20688139" Received: from mail-la0-f54.google.com ([209.85.215.54]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 10 Jul 2013 15:48:56 +0200 Received: by mail-la0-f54.google.com with SMTP id ec20so5685477lab.41 for ; Wed, 10 Jul 2013 06:48:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type :x-gm-message-state; bh=XGfA6NTqifZABfdjUUzGVHkuDOX8NlO50re/GVrWEAk=; b=MRWMXl5OJfR9kh+0dBhBbqHSflH4oLcH2dWZbAFCZA+RYgaSM07gKeDDWO+2F//GlO t+/Tobc6afvF6K32JwCjt3Mhgv2sPM0lqRu9c+KaYdch2xPITv2Ckq5mnGudK2Cuvteg v7Bk7VEjAYrJnSCDfODkfgNTvYyLxqD97W506/6947K71/yaoNQhyb0IMXMZ7zzBfvfr Q0nFP24+J8pM6hG9HtJ+C3C33QsdyQLkonguqF4zpJdedHpGHxo81qztlB/6r+IUDZBs ntHbu5LxpcGNChsx0BXmwpqkWXu7Pig6XtqUl01jUIsK5yDKnKGxse0kyd4ooRiWUbdY sD+Q== X-Received: by 10.112.53.10 with SMTP id x10mr15216956lbo.28.1373464135011; Wed, 10 Jul 2013 06:48:55 -0700 (PDT) Received: from golf.niidar.ru.niidar.ru ([109.188.124.234]) by mx.google.com with ESMTPSA id x8sm11095475lae.10.2013.07.10.06.48.53 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Wed, 10 Jul 2013 06:48:54 -0700 (PDT) From: Ivan Gotovchits To: caml-list@inria.fr Date: Wed, 10 Jul 2013 17:48:45 +0400 Message-ID: <878v1ea5ky.fsf@golf.niidar.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Gm-Message-State: ALoCoQlMWy6NZ5svmkxGg7Ze6iq9tAiRFVaVaZ0hcM9bUP2YjBy03B2Cha4OfD1+xKanM7ufHCXa Subject: [Caml-list] Applying labeled function without a label Please, can someone explain the reason behind the following behaviour: # let f ~a = a;; val f : a:'a -> 'a = if I apply function f, omiting the label, instead of an error I'll get: # f 12;; - : a:(int -> 'a) -> 'a = ... a function that accepts a labeled arguments, that is a function from int to 'a, and returns a result of this function: # f 12 ~a:(fun x -> x + 1);; - : int = 13 and even more, if I apply it to more unlabled arguments: # f 1 2 3 4 5;; - : a:(int -> int -> int -> int -> int -> 'a) -> 'a = It is very confusing...