Google Groups Home
Help | Sign in
using a wiki to answer low level language questions
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Peter Gregory  
View profile
 More options Nov 13 2006, 7:26 am
Newsgroups: fa.caml
From: Peter Gregory <Peter.Greg...@cis.strath.ac.uk>
Date: Mon, 13 Nov 2006 12:26:15 UTC
Local: Mon, Nov 13 2006 7:26 am
Subject: Re: [Caml-list] using a wiki to answer low level language questions

I don't really think it was too long a problem to post on the mailing
list, and it would probably help others to list the code here anyway:

#let rec serialize_list string_list_a glue_a =
  begin
     match string_list_a with
     []         -> ""
     | head::rest -> (glue_with glue_a head (serialize_list rest
glue_a))
  end

;;
val serialize_list : string list -> string -> string = <fun>

# serialize_list ["a";"b";"c"] "--";;

- : string = "a--b--c--"

Your problem was simply one of syntax, look at what you wrote:

  | head::rest -> glue_with (glue_a head serialize_list( rest glue_a ))

Your function glue_with takes three parameters, not one.

Cheers,
Peter.

> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google