Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!oitnews.harvard.edu!news.cs.umb.edu!CTCnet!news.math.psu.edu!feeder.chicago.cic.net!cs.utexas.edu!howland.erols.net!torn!kwon!watserv3.uwaterloo.ca!kmayall
From: kmayall@cousteau.uwaterloo.ca (Kevin Mayall)
Subject: deftype list-of-things?
Message-ID: <E4D8u1.nD@watserv3.uwaterloo.ca>
Sender: news@watserv3.uwaterloo.ca
Nntp-Posting-Host: cousteau.uwaterloo.ca
Organization: University of Waterloo
Date: Tue, 21 Jan 1997 16:08:25 GMT
Lines: 25

I'm having trouble defining a CL type, which I want to denote a list
where all the elements of the list of type Thing (Thing being a CLOS
class).

My books aren't helping too much and my unsuccessful attempt is below:

(deftype list-of-things (lis)
  `(and List (every #'(lambda (obj) (typep obj 'Thing)) ,lis)))

I would like to be able to evaluate forms such as 
(typep '(chair table lamp) 'list-of-things)

Any help is much appreciated.

Cheers..........

	Kevin Mayall



-- 
--------------------------------Bermuda Massive
Kevin Mayall               kmayall@uwaterloo.ca
         http://www.fes.uwaterloo.ca/u/kmayall/
     School of Planning, University of Waterloo
