From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id C7F81BC6D for ; Wed, 23 May 2007 01:17:10 +0200 (CEST) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.224]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4MNH9LT016497 for ; Wed, 23 May 2007 01:17:10 +0200 Received: by wr-out-0506.google.com with SMTP id 69so13182wra for ; Tue, 22 May 2007 16:17:09 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=Y8tEPsdH6v+EVMtEr0sn0Oc/4yPl7yUth8r9Tn0G12vRb2ZWr2wgMkQYtUppdBVfmPAyw0AOsLOM6dA6EYWcke5SqkvJoL/xo4M/1OjPWJbxAWWDDNWwk7bkDeDMRwSFS8QFPMBKOjcwQz/Fu3jPRAT6SHRNNLPUtk/HPZemOyA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=RpDZ7maypphKXcp3qiTOIiKF689e+/FXlmIExBRrqc2Rx4NC3m4G19/ousjZLcD/ZUHbwXdHCiUE+2vzU5oCfMselsZa6J51QKCbEAguJdoPAki2QsxqDOR6KrRubevx+NG/MPgWHEX1di0yFXAAmdSsiKQdEKBJzSUoF/KLijY= Received: by 10.114.58.1 with SMTP id g1mr3502896waa.1179875828756; Tue, 22 May 2007 16:17:08 -0700 (PDT) Received: by 10.114.158.16 with HTTP; Tue, 22 May 2007 16:17:08 -0700 (PDT) Message-ID: Date: Wed, 23 May 2007 01:17:08 +0200 From: "Damien Lefortier" Sender: eg.damy@gmail.com To: caml-list@yquem.inria.fr Subject: functions' recursive construction MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: 842b4145e54c73b8 X-j-chkmail-Score: MSGID : 465379F6.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 465379F6.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; damien:01 damien:01 recursive:01 knuth:01 rec:01 integer:01 argument:02 programming:03 let:03 let:03 nth:05 arguments:07 function:08 function:08 fun:08 Hi, I try to do a function f which takes one integer argument and returns a function g which returns its nth arguments. For example f 3 gives g with let g = fun x -> fun y -> fun z -> z ;; I tried to do that kind of f function. let rec f = function 1 -> fun x -> x | n -> fun _ -> f (n-1) ;; But it does not work, any idea ? -- Damien `Dam' Lefortier The most important thing in the programming language is the name -- D. Knuth