Re: Using "internal" macros of a CL implementation
- From: Ken Tilton <kentilton@xxxxxxxxx>
- Date: Sun, 29 Oct 2006 08:48:46 -0500
Victor Kryukov wrote:
Hello group,
I've the following question: I want to define macro case-string, which
behaves exactly like case, only using string-equal instead of eql.
I've looked up definition of case in SBCL[*], and realized that my
task is as simple as
(defmacro case-string (keyform &body cases)
(case-body 'case keyform cases t 'string-equal nil nil nil))
My problem is with case-body - it's not imported by default, and I
don't know how to import it (I guess that my problem is with
understanding how packages work, strictly speaking). I also don't know
how to make my definition of case-string portable - I guess not all CL
implementations may use case-body internally.
And I don't want simply to copy-paste case-body definition in my source
files - it's seems to be not elegant, I would need to copy definition
of list-of-length-at-least-p as well, etc.
Is there any elegant solution?
COND.
kt
--
Cells: http://common-lisp.net/project/cells/
"I'll say I'm losing my grip, and it feels terrific."
-- Smiling husband to scowling wife, New Yorker cartoon
.
- Follow-Ups:
- Re: Using "internal" macros of a CL implementation
- From: Victor Kryukov
- Re: Using "internal" macros of a CL implementation
- References:
- Using "internal" macros of a CL implementation
- From: Victor Kryukov
- Using "internal" macros of a CL implementation
- Prev by Date: Re: allegro cl installer -- A.I built in, all the way DOWN
- Next by Date: Re: newbie group http://groups-beta.google.com/group/common-lisp-beginners
- Previous by thread: Re: Using "internal" macros of a CL implementation
- Next by thread: Re: Using "internal" macros of a CL implementation
- Index(es):
Relevant Pages
|