mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-22 20:40:29 +02:00
(scm_stable_sort): Return empty list for input empty list, as
done in guile 1.6 and as always done by plain `sort'. Was falling through to SCM_WRONG_TYPE_ARG.
This commit is contained in:
parent
019618da74
commit
2081b955ad
1 changed files with 3 additions and 0 deletions
|
@ -531,6 +531,9 @@ SCM_DEFINE (scm_stable_sort, "stable-sort", 2, 0, 0,
|
|||
"This is a stable sort.")
|
||||
#define FUNC_NAME s_scm_stable_sort
|
||||
{
|
||||
if (SCM_NULL_OR_NIL_P (items))
|
||||
return SCM_EOL;
|
||||
|
||||
if (scm_is_pair (items))
|
||||
return scm_stable_sort_x (scm_list_copy (items), less);
|
||||
else if (scm_is_vector (items))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue