caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Juancarlo Añez" <juanca@suigeneris.org>
To: "'Alex Baretta'" <alex@barettadeit.com>
Cc: <caml-list@inria.fr>
Subject: RE: [Caml-list] Newbe question: Strings <-> char lists
Date: Thu, 10 Feb 2005 15:19:13 -0400	[thread overview]
Message-ID: <200502101919.j1AJJcWC011340@concorde.inria.fr> (raw)
In-Reply-To: <420B9B89.30209@barettadeit.com>

Alex,

 | As far as I now, Haskell actually implements strings as 
 | lists of characters, 

I'm pretty sure that Haskell lets you *treat* strings as list of characters,
yet provides an efficient implementation of strings underneath.

 | This explains the design choices behind the Ocaml string 
 | type as well as why a mapping from strings to char lists is 
 | not "standard" in Ocaml.

I don't mind that strings are not lists in OCAML, but I would still like to
convert (through a function) a string to a char list. There are no functions
for doing that in the stdlib, and I haven't been able to write my own (the
string concatenation operator does not accept a char [naturally] and there
are no "append" or "insert" functions in the library).

Juanco


  reply	other threads:[~2005-02-10 19:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-10 16:22 jabbr Paul Argentoff
2005-02-10 17:18 ` Newbe question: Strings <-> char lists Juancarlo Añez
2005-02-10 17:36   ` [Caml-list] " Alex Baretta
2005-02-10 19:19     ` Juancarlo Añez [this message]
2005-02-10 20:55       ` Marcin 'Qrczak' Kowalczyk
2005-02-10 17:48   ` Olivier Andrieu

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=200502101919.j1AJJcWC011340@concorde.inria.fr \
    --to=juanca@suigeneris.org \
    --cc=alex@barettadeit.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).