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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 7EA517F20B for ; Thu, 7 Feb 2013 21:58:04 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of agarwal1975@gmail.com) identity=pra; client-ip=209.85.212.50; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="agarwal1975@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of agarwal1975@gmail.com designates 209.85.212.50 as permitted sender) identity=mailfrom; client-ip=209.85.212.50; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="agarwal1975@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-vb0-f50.google.com) identity=helo; client-ip=209.85.212.50; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="postmaster@mail-vb0-f50.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtABAAgUFFHRVdQylGdsb2JhbAA8CYYCAbphCBYOAQEBAQkLCQkUBCOCFgkBAQQBJxkBGx0BAwELBgUDAQc7IgERAQUBHAYTh34BAwkGoUuMNIJ7hF4KGScNWYh3AQUMjQ+EQQOIZo07jnAWKYRB X-IPAS-Result: AtABAAgUFFHRVdQylGdsb2JhbAA8CYYCAbphCBYOAQEBAQkLCQkUBCOCFgkBAQQBJxkBGx0BAwELBgUDAQc7IgERAQUBHAYTh34BAwkGoUuMNIJ7hF4KGScNWYh3AQUMjQ+EQQOIZo07jnAWKYRB X-IronPort-AV: E=Sophos;i="4.84,623,1355094000"; d="scan'208";a="1889920" Received: from mail-vb0-f50.google.com ([209.85.212.50]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 07 Feb 2013 21:58:03 +0100 Received: by mail-vb0-f50.google.com with SMTP id ft2so1886843vbb.23 for ; Thu, 07 Feb 2013 12:58:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=Yh3Z9FbappWzg5duYeRHVZ29bK05AIOU9sKV37070fw=; b=GQWqTH1KRSdsA2g3XspjKhDf5HKHGXCTDYZbA1BYQKIWwLuE6P4u20HxoK+jANwc49 UxAJoIRlBO2n4tHaj+9G4Y+B5GHcHc3QA6h4+Y1GTxt4Uu3KN0muo4nThaYkBoJ9r5ua 4s7olEmr+wHFoNCGT5IpE+sVDf2MpeSWjDGxSUMm1202V9FRWBqB2tZEeDp/kvI+FCjV Pl4av9wN9Ve2uNTbzO+GAyHqvndFYXoH4/QBEsN/QvfciZFWDSfrNcz1nuV1/xv1f3bt MZkv8GF4jUyx0PDwELTdF9yxqKr0xb001zpWOuOqIU5pFovK0fnepGfXHDKTe6w1l2Z8 lCyg== X-Received: by 10.52.180.202 with SMTP id dq10mr3083509vdc.129.1360270682902; Thu, 07 Feb 2013 12:58:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.58.116.177 with HTTP; Thu, 7 Feb 2013 12:57:42 -0800 (PST) In-Reply-To: <51140799.3090908@ens-lyon.org> References: <51140799.3090908@ens-lyon.org> From: Ashish Agarwal Date: Thu, 7 Feb 2013 15:57:42 -0500 Message-ID: To: Martin Jambon Cc: Caml List Content-Type: multipart/alternative; boundary=bcaec5171f1dda520c04d528b204 Subject: Re: [Caml-list] use identity for default function --bcaec5171f1dda520c04d528b204 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Feb 7, 2013 at 2:59 PM, Martin Jambon wrote: > What's wrong with the following: > > let foo ~f x = ... > let fooi ?(f = fun x -> x) x = foo ~f x I'd not even define fooi. One can easily call `foo id`, so indeed this is not a big issue. It would just be a slight convenience to have the default, and it's mostly out of curiosity. --bcaec5171f1dda520c04d528b204 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Thu, Feb 7, 2013 at 2:59 PM, Martin Jambon <martin.jambon@ens-= lyon.org> wrote:
=A0
=
What's wrong with the following:

let foo ~f x =3D ...
let fooi ?(f =3D fun x -> x) x =3D foo ~f x

<= div>I'd not even define fooi. One can easily call `foo id`, so indeed t= his is not a big issue. It would just be a slight convenience to have the d= efault, and it's mostly out of curiosity.

--bcaec5171f1dda520c04d528b204--