Re: how to tail recurse

Subject: Re: how to tail recurse
From: Toby Speight <Toby.Speight@xxxxxxxxxxxxxx>
Date: 22 Jul 1998 16:05:54 +0100
LD> Louis-Dominique Dubeau <URL:mailto:ldd@xxxxxxxxxxx>

=> In article <q8r9ze804p.fsf@xxxxxxxxxxxxxxxxxxx>, LD wrote:


LD> I'm aware that the standard defines the ancestors function and
LD> that depth could have been defined thus:
LD>
LD> (define (depth node)
LD>   (node-list-length (ancestors node)))
LD>
LD> but when I tried that, Jade didn't like it so I must assume that
LD> ancestors is not supported by Jade right now.

There's a simple definition of ancestors in section 10.2.3, page 140.
You might want to improve its error-checking, but it should be usable
as-is.

-- 


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread
  • how to tail recurse
    • Louis-Dominique Dubeau - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id JAA02198Wed, 22 Jul 1998 09:53:45 -0400 (EDT)
      • Toby Speight - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id LAA05285Wed, 22 Jul 1998 11:02:12 -0400 (EDT)
      • Toby Speight - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id LAA06170Wed, 22 Jul 1998 11:04:34 -0400 (EDT) <=
      • <Possible follow-ups>
      • Frank A. Christoph - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id WAA25717Wed, 22 Jul 1998 22:04:43 -0400 (EDT)