summaryrefslogtreecommitdiff
path: root/srfi/srfi-1.c
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2005-01-23 21:27:51 +0000
committerKevin Ryde <user42@zip.com.au>2005-01-23 21:27:51 +0000
commit4e3cc389f0c5ab472cfe4df5e616c73b8700352c (patch)
tree0fbeb4d1bd0ff796ee53906f151e05821202dd4a /srfi/srfi-1.c
parentac70289c71f583ebb52d2ed9b69e3e10dbb4a2d9 (diff)
downloadguile-4e3cc389f0c5ab472cfe4df5e616c73b8700352c.tar.gz
(scm_srfi1_member): Update docstring from manual.
Diffstat (limited to 'srfi/srfi-1.c')
-rw-r--r--srfi/srfi-1.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/srfi/srfi-1.c b/srfi/srfi-1.c
index 280089f8c..c1f3c60eb 100644
--- a/srfi/srfi-1.c
+++ b/srfi/srfi-1.c
@@ -716,14 +716,21 @@ scm_srfi1_for_each (SCM proc, SCM arg1, SCM args)
SCM_DEFINE (scm_srfi1_member, "member", 2, 1, 0,
(SCM x, SCM lst, SCM pred),
- "Return the first sublist of @var{lst} whose car is\n"
- "@var{equal?} to @var{x} where the sublists of @var{lst} are\n"
- "the non-empty lists returned by @code{(list-tail @var{lst}\n"
- "@var{k})} for @var{k} less than the length of @var{lst}. If\n"
- "@var{x} does not occur in @var{lst}, then @code{#f} (not the\n"
- "empty list) is returned. If optional third argument @var{equal?}\n"
- "isn't given, @code{equal?} is used for comparison.\n"
- "(Extended from R5RS.)\n")
+ "Return the first sublist of @var{lst} whose @sc{car} is equal\n"
+ "to @var{x}. If @var{x} does not appear in @var{lst}, return\n"
+ "@code{#f}.\n"
+ "\n"
+ "Equality is determined by @code{equal?}, or by the equality\n"
+ "predicate @var{=} if given. @var{=} is called @code{(= @var{x}\n"
+ "elem)}, ie.@: with the given @var{x} first, so for example to\n"
+ "find the first element greater than 5,\n"
+ "\n"
+ "@example\n"
+ "(member 5 '(3 5 1 7 2 9) <) @result{} (7 2 9)\n"
+ "@end example\n"
+ "\n"
+ "This version of @code{member} extends the core @code{member} by\n"
+ "accepting an equality predicate.")
#define FUNC_NAME s_scm_srfi1_member
{
scm_t_trampoline_2 equal_p;