summaryrefslogtreecommitdiff
path: root/libguile/generalized-arrays.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2010-04-07 21:04:37 +0200
committerAndy Wingo <wingo@pobox.com>2010-04-07 21:04:37 +0200
commite48a2f8705623e23c21dca5bb38ab437d82b39e4 (patch)
tree25377995969e7d8c3ce05172676078c75169967a /libguile/generalized-arrays.c
parentf5318d8b188c6636d1f593bb1d2690ba1b0a42e4 (diff)
downloadguile-e48a2f8705623e23c21dca5bb38ab437d82b39e4.tar.gz
add docs and tests for array->list
* libguile/generalized-arrays.c (scm_array_to_list): Add docs. * test-suite/tests/arrays.test ("array->list"): Add tests.
Diffstat (limited to 'libguile/generalized-arrays.c')
-rw-r--r--libguile/generalized-arrays.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libguile/generalized-arrays.c b/libguile/generalized-arrays.c
index ff05151b3..a04b5faa1 100644
--- a/libguile/generalized-arrays.c
+++ b/libguile/generalized-arrays.c
@@ -250,8 +250,14 @@ array_to_list (scm_t_array_handle *h, size_t dim, unsigned long pos)
SCM_DEFINE (scm_array_to_list, "array->list", 1, 0, 0,
(SCM array),
- "FIXME description a list consisting of all the elements, in order, of\n"
- "@var{array}.")
+ "Return a list representation of @var{array}.\n\n"
+ "It is easiest to specify the behavior of this function by\n"
+ "example:\n"
+ "@example\n"
+ "(array->list #0(a)) @result{} 1\n"
+ "(array->list #1(a b)) @result{} (a b)\n"
+ "(array->list #2((aa ab) (ba bb)) @result{} ((aa ab) (ba bb))\n"
+ "@end example\n")
#define FUNC_NAME s_scm_array_to_list
{
scm_t_array_handle h;