From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Hartwig Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] add regexp-split Date: Fri, 30 Dec 2011 23:33:20 +0800 Message-ID: References: <8762gyjjp2.fsf@neil-laptop.ossau.uklinux.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1325259211 25587 80.91.229.12 (30 Dec 2011 15:33:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 30 Dec 2011 15:33:31 +0000 (UTC) Cc: guile-devel To: Neil Jerram Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Dec 30 16:33:26 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RgeST-0007qE-Qe for guile-devel@m.gmane.org; Fri, 30 Dec 2011 16:33:25 +0100 Original-Received: from localhost ([::1]:36539 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgeST-0001Mi-DI for guile-devel@m.gmane.org; Fri, 30 Dec 2011 10:33:25 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:60337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgeSQ-0001MM-98 for guile-devel@gnu.org; Fri, 30 Dec 2011 10:33:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RgeSP-0007Fz-24 for guile-devel@gnu.org; Fri, 30 Dec 2011 10:33:22 -0500 Original-Received: from mail-tul01m020-f169.google.com ([209.85.214.169]:47479) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgeSO-0007Fv-VJ for guile-devel@gnu.org; Fri, 30 Dec 2011 10:33:21 -0500 Original-Received: by obcwo8 with SMTP id wo8so12521336obc.0 for ; Fri, 30 Dec 2011 07:33:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Sx1vxIUu2FwFfWRZ8j1tx9+hGLohgtnQtI3R9xXOZ0o=; b=Y51J5g+EyGumAzDq1AuCLofFQ6n61oSAAW/E5jJqEKzOX4H8TTM2Jzn/v0SXct+lRv 0iAN4XHL6fRBRZ7JpKJzVPE+gWag2ZbpH6iqRHMVnplDR1l05+xHW7Fql2XTT+ClXtXj F+afyXnbRA8/4hBeTlPU64nHOmKIwEKmjzZ+w= Original-Received: by 10.50.190.196 with SMTP id gs4mr46938455igc.14.1325259200218; Fri, 30 Dec 2011 07:33:20 -0800 (PST) Original-Received: by 10.231.48.68 with HTTP; Fri, 30 Dec 2011 07:33:20 -0800 (PST) In-Reply-To: <8762gyjjp2.fsf@neil-laptop.ossau.uklinux.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.169 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:13211 Archived-At: On 30 December 2011 21:03, Neil Jerram wrote: > Nala Ginrut writes: > >> hi guilers! >> It seems like there's no "regexp-split" procedure in Guile. >> What we have is "string-split" which accepted Char only. >> So I wrote one for myself. > > We've had this topic before, and it only needs a search for > "regex-split guile" to find it: > http://old.nabble.com/regex-split-for-Guile-td31093245.html. > Good to see that there is continuing interest in this feature. IMO, the implementation here is more elegant and readable for it's use of `fold-matches'. The first implementation from the thread you mention effectively rolls it's own version of `fold-matches' over the result of `list-matches' (which is implemented using `fold-matches' !).