Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release > by-pkgid > 6b3585ea67ce3e79c9049b5b33294cdd > files > 616

docbook-style-dsssl-doc-1.79-16.mga7.noarch.rpm

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

<RefMeta>
  <RefEntryTitle>assoc-objs</RefEntryTitle>
  <RefMiscInfo Role="file">dblib.dsl</RefMiscInfo>
</RefMeta>

<RefNameDiv>
  <RefName>assoc-objs</RefName>
  <RefPurpose>Returns a list of the objects in an associative list</RefPurpose>
</RefNameDiv>

<RefSynopsisDiv><Title>Synopsis</Title>
<Synopsis>
(assoc-objs alist)
</Synopsis>
</RefSynopsisDiv>

<RefSect1><Title>Description</Title>

<para>
Returns a list of the objects in an associative list.
</para>
<variablelist>
<varlistentry><term>alist</term>
<listitem>
<para>
The associative list. An associative list is a list of lists
where each interior list is a pair of elements.
</para>
</listitem>
</varlistentry>
</variablelist>

</RefSect1>

<RefSect1><Title>Example</Title>

<para>
<literal>(assoc-objs (("a" "b") ("c" "d")))</literal> returns <literal>("a" "c")</literal>
</para>


</RefSect1>

<RefSect1><Title>Author</Title>

<para>
Norman Walsh, &lt;ndw@nwalsh.com&gt;
</para>
</RefSect1>
<RefSect1><Title>Source Code</Title>

<ProgramListing>
(define (assoc-objs alist)
  ;; Returns a list of the objects in an associative list
  (let loop ((result '()) (al alist))
    (if (null? al)
	result
	(loop (append result (list (car (car al)))) (cdr al)))))
</ProgramListing>
</RefSect1>

</RefEntry>