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!newsfeed.internetmci.com!hunter.premier.net!news.nl.innet.net!INnl.net!feed1.news.innet.be!INbe.net!cold.news.pipex.net!pipex!dish.news.pipex.net!pipex!bhars12c.bnr.co.uk!bcarh8ac.bnr.ca!nrchh45.rich.nt.com!bcarh189.bnr.ca!nott!kwon!watserv3.uwaterloo.ca!news
From: Kevin Mayall <kmayall@uwaterloo.ca>
Subject: Re: deftype list-of-things?
Content-Type: text/plain; charset=us-ascii
Message-ID: <32E62806.77D5@uwaterloo.ca>
Sender: news@watserv3.uwaterloo.ca
Nntp-Posting-Host: cnts1p27.uwaterloo.ca
Reply-To: kmayall@uwaterloo.ca
Content-Transfer-Encoding: 7bit
Organization: University of Waterloo
References: <E4D8u1.nD@watserv3.uwaterloo.ca> <5c407h$mst@Godzilla.cs.nwu.edu>
Mime-Version: 1.0
Date: Wed, 22 Jan 1997 14:45:26 GMT
X-Mailer: Mozilla 3.0 (Win95; I)
Lines: 16

Seth Tisue wrote:
> But your main difficulty is that you've misunderstood deftype.  The
> body of a deftype isn't allowed to expand into just any Lisp code.
> It's supposed to expand into a valid type specifier.  Type specifiers
> sometimes look like code, but aren't really.  Try:
> 
> (defun list-of-things-p (lis)
>   (every #'(lambda (obj) (typep obj 'thing)) lis))
> 
> (deftype list-of-things ()
>   '(and list
>     (satisfies list-of-things-p)))

Thank you very much Seth.  I needed "satisfies".  What is satisfies
anyway?  It's not a function, but it looks like one, and judging from
CLtL2, the (and ... ) form is evaluated, no?
