x-absolute-child-number
Prev 

Name

x-absolute-child-number — Returns the absolute child number of the specified node

Synopsis

(x-absolute-child-number snl)

Description

Returns the child number, regardless of gi, of snl within its parent.

Isn't there a better way to get this?

snl

The node (singleton node list) whose child number is desired.

Author

Norman Walsh, <ndw@nwalsh.com>

Source Code

(define (x-absolute-child-number snl)
  ;; Returns the absolute child number of the specified node
  (let loop ((nl (children (parent snl))) (count 1))
    (if (node-list-empty? nl)
	#f
	(if (node-list=? (node-list-first nl) snl)
	    count
	    (loop (node-list-rest nl) (+ count 1))))))

PrevHome 
unit-conversion-alistUp 
 
 

Copyright © 1997 Norman Walsh