[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
1Question about declaration0
- To: RWK@yukon.scrc.symbolics.com, miller@cs.rochester.edu
- Subject: 1Question about declaration0
- From: Jeff Mincy <mincy@Think.COM>
- Date: Sun, 13 Dec 87 16:07 EST
- Cc: CL@acorn.cs.rochester.edu
- Character-type-mappings: (1 0 (NIL 0) (NIL :CONDENSED NIL) "CPTFONTC")
- Fonts: CPTFONT, CPTFONTC
- In-reply-to: <19871211155410.7.RWK@WHITE-BIRD.SCRC.Symbolics.COM>
Date: Fri, 11 Dec 87 10:54 EST
From: Robert W. Kerns <RWK@yukon.scrc.symbolics.com>
Date: Fri, 11 Dec 87 01:16 EST
From: Brad Miller <miller@ACORN.CS.ROCHESTER.EDU>
1How would you write a function declaration for the following?
0 1(defun foo (bar)
0 1(declare (type list bar))
0 1(values-list bar)
0 1(proclaim '(function foo (list) ????))
0 I wouldn't. CL doesn't have any syntax for declaring
a variable number of values, period.
The &optional, &rest, and &key markers may appear in the value-type list
for the values type-specifier. p 48, CLtL.
The value-type for the function type-specifier may be a values type specifier.
p 47 CLtL
Therefore
One can say (function (number) (values number &optional float)),
to specify that a function returns a variable number of values.
But, It doesnt mean that anyone will listen to the declaration,
just because you can say it.
-jeff