From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 4D8127F02D for ; Sun, 19 Oct 2014 17:37:13 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of r.wobben@home.nl) identity=pra; client-ip=212.54.34.164; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="r.wobben@home.nl"; x-sender="r.wobben@home.nl"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of r.wobben@home.nl) identity=mailfrom; client-ip=212.54.34.164; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="r.wobben@home.nl"; x-sender="r.wobben@home.nl"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@smtpq1.gn.mail.iss.as9143.net) identity=helo; client-ip=212.54.34.164; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="r.wobben@home.nl"; x-sender="postmaster@smtpq1.gn.mail.iss.as9143.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjsBAHfZQ1TUNiKknGdsb2JhbABbhDaDBtBfAoEOFgERAQEBAQEGDQkJFC6EAwEBBCMEEUARCxgCAgUWCwICCQMCAQIBDzYTBgIBAYgnAxWrN41cDYYxASuBLIxxggE6FoJhgVQBBJMHiEGCEYEwg0aCcodgilNqgksBAQE X-IPAS-Result: AjsBAHfZQ1TUNiKknGdsb2JhbABbhDaDBtBfAoEOFgERAQEBAQEGDQkJFC6EAwEBBCMEEUARCxgCAgUWCwICCQMCAQIBDzYTBgIBAYgnAxWrN41cDYYxASuBLIxxggE6FoJhgVQBBJMHiEGCEYEwg0aCcodgilNqgksBAQE X-IronPort-AV: E=Sophos;i="5.04,749,1406584800"; d="scan'208";a="83829042" Received: from smtpq1.gn.mail.iss.as9143.net ([212.54.34.164]) by mail3-smtp-sop.national.inria.fr with ESMTP; 19 Oct 2014 17:37:12 +0200 Received: from [212.54.34.136] (helo=smtp5.gn.mail.iss.as9143.net) by smtpq1.gn.mail.iss.as9143.net with esmtp (Exim 4.71) (envelope-from ) id 1XfsXf-0001aS-EF for caml-list@inria.fr; Sun, 19 Oct 2014 17:37:11 +0200 Received: from 524acd6d.cm-4-3d.dynamic.ziggo.nl ([82.74.205.109] helo=[192.168.0.100]) by smtp5.gn.mail.iss.as9143.net with esmtp (Exim 4.71) (envelope-from ) id 1XfsXf-0001bC-6o for caml-list@inria.fr; Sun, 19 Oct 2014 17:37:11 +0200 Message-ID: <5443DAB0.7050604@home.nl> Date: Sun, 19 Oct 2014 17:37:20 +0200 From: Roelof Wobben User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: caml-list@inria.fr References: <5443A96B.5010505@home.nl> <87iojgp7b1.fsf@gmail.com> <5443D50B.5000306@home.nl> In-Reply-To: <5443D50B.5000306@home.nl> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Ziggo-spambar: ---- X-Ziggo-spamscore: -4.4 X-Ziggo-spamreport: ALL_TRUSTED=-1,BAYES_00=-1.9,CM_META_TB_NOARR=0.5,PROLO_TRUST_RDNS=-3,RDNS_DYNAMIC=0.982 X-Ziggo-Spam-Status: No X-Spam-Flag: No Subject: Re: [Caml-list] reverse a list Roelof Wobben schreef op 19-10-2014 17:13: > Philippe Wang schreef op 19-10-2014 15:59: >> On Sun, Oct 19, 2014 at 2:34 PM, Malcolm Matalka >> wrote: >>> Lists are immutable so you'll be constructing a list as you consume >>> another list. >> Please don't formulate it this way, as it sounds to me as if the list >> being "consumed" is disappearing (because that's what generally >> happens when something is being "consumed"). :-/ >> To the beginners reading this: well, in OCaml, any given list will >> never disappear before it actually becomes useless, and they may be >> "consumed" over and over again without any "harm" happening to them. >> > > Thanks all > > Now trying to find out how I can add things to the second list. I > think this can work 2::l2 > > Roelof > I have found a way : let rec test l1 l2 = match l1 with | [] -> l2 | h :: t -> test t (h::l2) ;; Roelof