Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] Applications written in O'Caml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Eric Merritt <cyberlync@y...>
Subject: [Caml-list] Simple question
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