From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA07797; Fri, 12 Apr 2002 18:44:05 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA03353 for ; Fri, 12 Apr 2002 18:44:04 +0200 (MET DST) Received: from web13002.mail.yahoo.com (web13002.mail.yahoo.com [216.136.174.12]) by concorde.inria.fr (8.11.1/8.11.1) with SMTP id g3CGi3L20096 for ; Fri, 12 Apr 2002 18:44:03 +0200 (MET DST) Message-ID: <20020412164400.60556.qmail@web13002.mail.yahoo.com> Received: from [4.18.166.227] by web13002.mail.yahoo.com via HTTP; Fri, 12 Apr 2002 09:44:00 PDT Date: Fri, 12 Apr 2002 09:44:00 -0700 (PDT) From: Eric Merritt Subject: [Caml-list] Simple question To: caml-list@inria.fr In-Reply-To: <5584.1018628138@saul.cis.upenn.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk let me start off by saying that if this is not the place to post this type of question please direct me to the correct list/group. I am picking up ocaml, starting off by doing a few simple things. I am at somewhat of an impass here in that I cannot figure out why the function below gives me type errors. It works fine if I leave it non-tail recursive, but as soon as I put in an accumulator and make it tail-recursive it fails to compile. If one of you could please point me in the right direction for solving this problem that would be great. btw this is only for my own edification. let rec apply_fun_list x f_list accm = match f_list with h::t -> apply_fun_list x t accum::(h x) | [] -> accum::[];; Error is The expression has type 'a list but is here used with type 'a Thank you for your attention. Eric __________________________________________________ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners