[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: simple pattern matcher

From: Keisuke Nishida
Subject: Re: simple pattern matcher
Date: Sun, 25 Feb 2001 11:18:54 -0500
User-agent: Wanderlust/2.4.0 (Rio) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/21.0.96 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI)

At Sat, 24 Feb 2001 17:33:43 -0500,
Keisuke Nishida wrote:
> But probably you are right; I'll try to port one of them some time
> if nobody else wants to do that.

Actually, I don't need to port it, if I can depend on slib.
With Anrew K. Wright's matcher, the following module is sufficient:

---- ice-9/match.scm -------------------
(define-module  (ice-9 match)
  :use-module (ice-9 slib)
  :export (match))

(load "match-slib.scm")

guile> (use-modules (ice-9 match))
guile> (match '(+ 1 2) (('+ x y) `(add ,x ,y)))
(add 1 2)

May I add these files?  Or maybe I can include the module definition
in "match-slib.scm" and rename it "match.scm".


reply via email to

[Prev in Thread] Current Thread [Next in Thread]