caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Eric Merritt <cyberlync@yahoo.com>
To: caml-list@inria.fr
Subject: [Caml-list] Simple question
Date: Fri, 12 Apr 2002 09:44:00 -0700 (PDT)	[thread overview]
Message-ID: <20020412164400.60556.qmail@web13002.mail.yahoo.com> (raw)
In-Reply-To: <5584.1018628138@saul.cis.upenn.edu>

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


  reply	other threads:[~2002-04-12 16:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-12 15:51 [Caml-list] Applications written in O'Caml Vincent Foley
2002-04-12 16:15 ` Benjamin C. Pierce
2002-04-12 16:44   ` Eric Merritt [this message]
2002-04-12 16:59     ` [Caml-list] Simple question Remi VANICAT
2002-04-12 17:04     ` Maxence Guesdon
2002-04-12 17:57       ` Remi VANICAT
2002-04-12 19:15         ` Eric Merritt
2002-04-12 19:55           ` John Prevost
2002-04-15 20:08             ` Eric Merritt
2002-04-12 20:20           ` james woodyatt
2002-04-13 11:10           ` Remi VANICAT
2002-04-13 12:45   ` [Caml-list] Applications written in O'Caml Oliver Bandel
2002-04-13 19:07     ` Benjamin C. Pierce
2002-04-12 16:40 ` Maxence Guesdon
2002-04-12 17:04 ` Warp
2002-04-13  2:27 ` eijiro_sumii
2002-04-13  3:28   ` Michael Vanier
2002-04-15  8:16 ` Nicolas barnier
2002-04-16 10:12 ` Jacek Chrzaszcz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020412164400.60556.qmail@web13002.mail.yahoo.com \
    --to=cyberlync@yahoo.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).