[Bese-devel] matcher ext

Kilian Sprotte ml13 at onlinehome.de
Sat Mar 4 20:09:09 UTC 2006


Hi again,

I hope I am sending something more useful this time...

There are three new matchers that could be useful:

	:and (a-spec b-spec)
	:plist (&rest items)
	:accessors (type &rest accs-vals)

I have added some test cases for them as well - I think they
are pretty okay.

CL-USER> (match '(:plist :a a :b b) '(:b 1 :a 2))
T
(:B 1 :A 2)
((B . 1) (A . 2))
CL-USER> (defclass foo ()
            ((x :initarg :x :accessor x)
             (z :initarg :z :accessor z)))
#<STANDARD-CLASS FOO>
CL-USER> (match '(:accessors foo x a z b) (make-instance 'foo :x 1 :z  
2))
T
#<FOO #x8A7FAA6>
((B . 2) (A . 1))

Cheers,

	Kilian



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/bese-devel/attachments/20060304/533b1afc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CHANGESET.gz
Type: application/x-gzip
Size: 9483 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/bese-devel/attachments/20060304/533b1afc/attachment.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/bese-devel/attachments/20060304/533b1afc/attachment-0001.html>


More information about the bese-devel mailing list