<RefEntry id="ifollow">
<!-- This file is generated automatically from the DSSSL source. -->
<!-- Do not edit this file! -->
<?html-filename ifollow.html>

<RefMeta>
  <RefEntryTitle>ifollow</RefEntryTitle>
  <RefMiscInfo Role="file">dblib.dsl</RefMiscInfo>
</RefMeta>

<RefNameDiv>
  <RefName>ifollow</RefName>
  <RefPurpose>Implements ifollow as per ISO/IEC 10179:1996</RefPurpose>
</RefNameDiv>

<RefSynopsisDiv><Title>Synopsis</Title>
<Synopsis>
(ifollow nl)
</Synopsis>
</RefSynopsisDiv>

<RefSect1><Title>Description</Title>

<para>
Implements <literal>ifollow</literal> as per ISO/IEC 10179:1996</para>


</RefSect1>

<RefSect1><Title>Author</Title>

<para>
From ISO/IEC 10179:1996</para>
</RefSect1>
<RefSect1><Title>Source Code</Title>

<ProgramListing>
(define (ifollow nl)
  ;; Implements ifollow as per ISO/IEC 10179:1996
  (node-list-map (lambda (snl)
		   (let loop ((rest (siblings snl)))
		     (cond ((node-list-empty? rest)
			    (empty-node-list))
			   ((node-list=? (node-list-first rest) snl)
			    (node-list-first (node-list-rest rest)))
			   (else
			    (loop (node-list-rest rest))))))
		 nl))
</ProgramListing>
</RefSect1>

</RefEntry>
