[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FUNCTION-TYPE-REST-LIST-ELEMENT, FUNCTION-DECLARATION issues
- To: cl-cleanup@SAIL.Stanford.EDU
- Subject: FUNCTION-TYPE-REST-LIST-ELEMENT, FUNCTION-DECLARATION issues
- From: Dick Gabriel <RPG@SAIL.Stanford.EDU>
- Date: Thu 3 Dec 1987 12:23:00 UTC
I'd like to reiterate what Pavel said: the declaration
(declare (function my-cons (float string) list) )
means that the function MY-CONS accepts two arguments, the first at least
of the type FLOAT (it can be a more general type), and the second at least
of the type STRING; it returns one value which is of the type LIST (it
could be more specific).
Unfortunately, it does not mean that if the two arguments are of types
FLOAT and STRING then the result is of type LIST, which would be
useful.
Lucid has a variant of this called RESTRICTIVE-FTYPE (or something),
which would mean MY-CONS assumes it receives two arguments of types
FLOAT and STRING and produces something of type LIST.
See page 47 (CLtL), the last complete paragraph, to see this.
-rpg-