guile-devel
[Top][All Lists]
Advanced

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

doco list and friends


From: Kevin Ryde
Subject: doco list and friends
Date: Thu, 10 Jul 2003 08:19:41 +1000
User-agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.2 (gnu/linux)

        * scheme-compound.texi (List Constructors): In "list", reword for
        clarity.  Add scm_list_1, scm_list_2, scm_list_3, scm_list_4,
        scm_list_5, scm_list_n.  Remove scm_list, since it's a no-op.

I think it's clearer to write something like "elem1 ... elemN" than
". objs".  The latter will be fine for experienced programmers but I
think newcomers would find a "..." style better.

I take it scm_list_n is the replacement for gh_list and hence ought to
be described.  Should the rest be documented too?

Plain scm_list seems a bit useless, since it does nothing but return
the list you must create yourself to call it.  I think it could be
quietly dropped.


 - Scheme Procedure: list elem1 ... elemN
 - C Function: scm_list_1 (elem1)
 - C Function: scm_list_2 (elem1, elem2)
 - C Function: scm_list_3 (elem1, elem2, elem3)
 - C Function: scm_list_4 (elem1, elem2, elem3, elem4)
 - C Function: scm_list_5 (elem1, elem2, elem3, elem4, elem5)
 - C Function: scm_list_n (elem1, ..., elemN, SCM_UNDEFINED)
     Return a new list containing elements ELEM1 to ELEMN.

     `scm_list_n' takes a variable number of arguments, terminated by
     `SCM_UNDEFINED'.  That final `SCM_UNDEFINED' is not included in
     the list.  (Note that none of ELEM1 to ELEMN can themselves be
     `SCM_UNDEFINED', or `scm_list_n' will terminate at that point.)




reply via email to

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