guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How is a procedure's signature documented?


From: Diogo F. S. Ramos
Subject: How is a procedure's signature documented?
Date: Tue, 29 Apr 2014 10:22:33 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Is there a pattern they must/should follow?

Using (ice-9 documentation), I've been looking at some procedure
signatures.  For what I can tell, they are described in the first line
of `object-documentation'.

Here are some examples:

(object-documentation car)
 => "- Scheme Procedure: car "

(object-documentation cdr)
 => "- Scheme Procedure: cdr "

(object-documentation list)
 => "- Scheme Procedure: list .  objs"

(object-documentation array-ref)
 => "- Scheme Procedure: array-ref v [idx0 [idx1 .  idxN]]"

`car' and `cdr' don't show a lambda list.  `list' shows a dot, which I
assume it's an indication that the following parameter is a rest.
`array-ref' too has a dot, but it also has []s which IIUC represent
optional arguments but are not valid lambda list constituents.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]