node-list-first-element
Name
node-list-first-element -- Return the first element node in a node list
Synopsis
(node-list-first-element nodelist)
Description
This function returns the first node in a node list which is
an element (as opposed to a PI or anything else that might appear
in a node list).
Author
Norman Walsh, <ndw@nwalsh.com>
Source Code
(define (node-list-first-element nodelist)
;; Return the first element node in a node list
(let loop ((nl nodelist))
(if (node-list-empty? nl)
(empty-node-list)
(if (gi (node-list-first nl))
(node-list-first nl)
(loop (node-list-rest nl))))))