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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id 737A17F2AA for ; Tue, 18 Dec 2012 14:13:45 +0100 (CET) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of eric.jaeger@ssi.gouv.fr) identity=pra; client-ip=86.65.182.16; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="eric.jaeger@ssi.gouv.fr"; x-sender="eric.jaeger@ssi.gouv.fr"; x-conformance=sidf_compatible Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of eric.jaeger@ssi.gouv.fr) identity=mailfrom; client-ip=86.65.182.16; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="eric.jaeger@ssi.gouv.fr"; x-sender="eric.jaeger@ssi.gouv.fr"; x-conformance=sidf_compatible Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp.ssi.gouv.fr) identity=helo; client-ip=86.65.182.16; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="eric.jaeger@ssi.gouv.fr"; x-sender="postmaster@smtp.ssi.gouv.fr"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EAMZr0FBWQbYQ/2dsb2JhbABEgkm7XRZzgh8BBQgCHgUxKAMCCUYZPgEBBB4FiAeoE5BQjWODKQONfY1linCCdA X-IronPort-AV: E=Sophos;i="4.84,309,1355094000"; d="scan'208,217";a="186670162" Received: from smtp.ssi.gouv.fr ([86.65.182.16]) by mail1-smtp-roc.national.inria.fr with ESMTP; 18 Dec 2012 14:13:39 +0100 Received: from smtp-switch.internet.local (smtp-switch [192.168.3.9]) by smtp.ssi.gouv.fr (Postfix) with ESMTP id B68B190B97F for ; Tue, 18 Dec 2012 14:13:38 +0100 (CET) From: "Eric Jaeger" To: References: <50d02b65.6c4cb40a.66ab.4256SMTPIN_ADDED_BROKEN@mx.google.com> In-Reply-To: Date: Tue, 18 Dec 2012 14:13:37 +0100 Message-ID: <006701cddd21$7e4235a0$7ac6a0e0$@jaeger@ssi.gouv.fr> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0068_01CDDD29.E0069DA0" X-Mailer: Microsoft Outlook Thread-Index: Ac3dEeiWVpgYwH+TTG+aUhxjz+O/CQADL7WQ Content-Language: fr Subject: RE: [Caml-list] Function returning recursive lists This is a multi-part message in MIME format. ------=_NextPart_000_0068_01CDDD29.E0069DA0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Thanks all for your answers. The consensus seems to be that it is not possible to define an OCaml function returning recursive lists (or more generally recursive values), unless using various forms of tricks such as lazyness or Obj. So on the one hand we have OCaml functions as results of computations which are not analyzable, and on the other hand recursive (immutable) values which are analyzable but can only be defined instead of being computed. I would not request any form of "improvement" in this area (as far as I'm concerned, I'm not comfortable with such recursive values); this was pure curiosity. Regards, Eric ------=_NextPart_000_0068_01CDDD29.E0069DA0 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable

Thanks all for your answers. The consensus seems to be that it is not pos= sible to define an OCaml function returning recursive lists (or more genera= lly recursive values), unless using various forms of tricks such as lazynes= s or Obj. So on the one hand we have OCaml functions as results of computat= ions which are not analyzable, and on the other hand recursive (immutable) = values which are analyzable but can only be defined instead of being comput= ed.

&nbs= p;

I would not req= uest any form of “improvement” in this area (as far as I’= m concerned, I’m not comfortable with such recursive values); this wa= s pure curiosity.

 

&= nbsp; Regards, Eric

 

= ------=_NextPart_000_0068_01CDDD29.E0069DA0--