From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA22471 for caml-redistribution; Mon, 21 Dec 1998 11:17:55 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA22904 for ; Fri, 18 Dec 1998 20:28:00 +0100 (MET) Received: from shell5.ba.best.com (shell5.ba.best.com [206.184.139.136]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id UAA29856 for ; Fri, 18 Dec 1998 20:27:58 +0100 (MET) Received: from localhost (bpr@localhost) by shell5.ba.best.com (8.9.0/8.9.0/best.sh) with ESMTP id LAA04899 for ; Fri, 18 Dec 1998 11:27:57 -0800 (PST) Date: Fri, 18 Dec 1998 11:27:57 -0800 (PST) From: Brian Rogoff To: caml-list@inria.fr Subject: Subsequence references or substrings in OCaml Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: weis Hi, I've been doing a lot of string processing lately and trying to determine the correct "functional" approach to string processing. In SML '97 (hey, you've got to look at the competition ;-) the Basis Library has a signature SUBSTRING which has a substring type, whose values are just triples (s,i,n) where i is the starting index and n the size of the string s. It turns out that many algorithms are simplified by using this kind of representation for strings. It also turns out that similar string representations have been used before; if you hop over to http://www.cs.cmu.edu/~wjh/papers/ you'll see that "subsequence references" are pretty much the same thing. Its simple enough to implement subsequence references as a user defined type in OCaml, as I've done, but I am curious about whether anyone else who has used similar libraries would find a built-in substring or subsequence ref library useful. -- Brian