From 448a3bc26902a8d61506bf9bff6a3d54d039505b Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Sun, 10 Nov 1996 03:11:46 +0000 Subject: [PATCH] spelling fix --- libguile/list.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libguile/list.c b/libguile/list.c index 5a72bfb6e..53f5da1fd 100644 --- a/libguile/list.c +++ b/libguile/list.c @@ -118,7 +118,7 @@ scm_list_p(x) /* Return the length of SX, or -1 if it's not a proper list. - This uses the "tortise and hare" algorithm to detect "infinitely + This uses the "tortoise and hare" algorithm to detect "infinitely long" lists (i.e. lists with cycles in their cdrs), and returns -1 if it does find one. */ long @@ -126,7 +126,7 @@ scm_ilength(sx) SCM sx; { register long i = 0; - register SCM tortise = sx; + register SCM tortoise = sx; register SCM hare = sx; do { @@ -138,12 +138,12 @@ scm_ilength(sx) if SCM_NCONSP(hare) return -1; hare = SCM_CDR(hare); i++; - /* For every two steps the hare takes, the tortise takes one. */ - tortise = SCM_CDR(tortise); + /* For every two steps the hare takes, the tortoise takes one. */ + tortoise = SCM_CDR(tortoise); } - while (hare != tortise); + while (hare != tortoise); - /* If the tortise ever catches the hare, then the list must contain + /* If the tortoise ever catches the hare, then the list must contain a cycle. */ return -1; }