From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 14CDCBC88 for ; Thu, 10 Feb 2005 20:19:40 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j1AJJdGX011347 for ; Thu, 10 Feb 2005 20:19:39 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA01657 for ; Thu, 10 Feb 2005 20:19:39 +0100 (MET) Received: from mail.cwork.com (ctm.163.supernets.net [209.4.187.163] (may be forged)) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j1AJJcWC011340 for ; Thu, 10 Feb 2005 20:19:38 +0100 Message-Id: <200502101919.j1AJJcWC011340@concorde.inria.fr> Received: from casiopea ([201.243.195.128]) by mail.cwork.com (VisNetic.MailServer.v5.8.6.6) with SMTP id OWZEKG; Thu, 10 Feb 2005 14:21:02 -0500 From: =?iso-8859-1?Q?Juancarlo_A=F1ez?= To: "'Alex Baretta'" Cc: Subject: RE: [Caml-list] Newbe question: Strings <-> char lists Date: Thu, 10 Feb 2005 15:19:13 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.6353 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 Thread-Index: AcUPlzcry+mUDCEPSH6z5SRTnrLoUAABqlVA In-Reply-To: <420B9B89.30209@barettadeit.com> X-Miltered: at concorde with ID 420BB3CB.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 420BB3CA.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 char:01 haskell:01 implements:01 haskell:01 ocaml:01 char:01 ocaml:01 stdlib:01 strings:01 strings:01 functions:01 functions:01 append:02 string:03 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO, MSGID_FROM_MTA_HEADER autolearn=disabled version=3.0.2 X-Spam-Level: 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