caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: skaller <skaller@users.sourceforge.net>
To: Jon Harrop <jdh30@cam.ac.uk>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] String.map => Question to the OCaml-team
Date: 10 Apr 2004 20:14:46 +1000	[thread overview]
Message-ID: <1081592086.20677.256.camel@pelican> (raw)
In-Reply-To: <200404091328.53282.jdh30@cam.ac.uk>

On Fri, 2004-04-09 at 22:28, Jon Harrop wrote:
> On Friday 09 April 2004 12:01 pm, Oliver Bandel wrote:
> > it's nice to have a String.iter, but more functional would
> > be to have a String.map function.
> 
> Would that be:
> 
> val map : (char -> char) -> string -> string
> 
> or
> 
> val map : (char -> 'a) -> string -> 'a list
> 
> ?
> 
> But yes, ironically, now that I return to coding I need exactly this function 
> (the latter, actually). :)

And I need:

val map: (char -> string) -> string -> string

which is by far the most common need. An example is:

map to_UTF8 latin1_string

-- 
John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net



-------------------
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:[~2004-04-10 10:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-09 11:01 Oliver Bandel
2004-04-09 12:26 ` fis
2004-04-09 13:29   ` Jean-Christophe Filliatre
2004-04-09 14:44     ` fis
2004-04-09 15:12       ` Correnson Loïc
2004-04-09 14:56     ` Fernando Alegre
2004-04-09 17:00       ` brogoff
2004-04-09 18:26         ` Nicolas Cannasse
2004-04-09 12:28 ` Jon Harrop
2004-04-10 10:14   ` skaller [this message]

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=1081592086.20677.256.camel@pelican \
    --to=skaller@users.sourceforge.net \
    --cc=caml-list@inria.fr \
    --cc=jdh30@cam.ac.uk \
    /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).