ListLinksExpl




Source code:

<p xmlns:d="http://www.askemos.org/2005/NameSpaceDSSSL/">
<!--

 (me 'fold-links) => lambda (combinator inital-value)

 Fold-links yields a iterator function of two parameters,
 a combinator and an inital value.  The combinator is applied to each
 link of the current place ("me") and the accumulated inital value,
 i.e., the result from the combinator becomes the "inital value" for
 the next link.  Analogous to 'fold' from SRFI 1.

 The example uses 'cons' and the empty list to list all the links.

 Hint for the beginner: If you need just a few links, replace the
'cons' with a appropriate selective function.  This is _far_ cheaper
 than to 'filter' the result with some predicate.

 -->
 <d:for-each select="((me &apos;fold-links) cons &apos;())">
  <d:a d:href="(read-locator (msg &apos;location-format)
  (list (me (data (current-node)))))">
   <d:copy-of select="(current-node)"></d:copy-of>
  </d:a>
  <br></br>
 </d:for-each>
</p>

Diese Seite findet man von: overview, .


In Bearbeitung: Adc5dd0c30f6e63932811ed60e019bb2d.

Letzte Modifikation: Fri, 02 Mar 2007 17:32:00 +0100

Autor(en): Adc5dd0c30f6e63932811ed60e019bb2d,

Dokument Nummer A67bb0753e1676f81983e0ecf3a15b391 geliefert an Af4aad764b0fb48d49089dbe7880b1a03 um Wed, 08 Feb 2012 01:26:07 +0100