Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 258 lines (216 sloc) 11.474 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258
<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <title>clojure.set - Clojure v1.1 API documentation</title>
    <link href="../static/favicon.png" rel="icon" />
    <link href="../static/favicon.png" rel="shortcut icon" />
    <link media="all" type="text/css" href="../static/clojure.css" rel="stylesheet" />
    <link media="all" type="text/css" href="../static/wiki.css" rel="stylesheet" />
    <link media="all" type="text/css" href="../static/internal.css" rel="stylesheet" />
    <style>.menuWrapper{height: 36px;}</style>
  </head>
<!--
This document was auto-generated from the source by the clojure autodoc system.
To report errors or ask questions about the overall documentation structure, formatting,
etc., contact Tom Faulhaber (google mail name: tomfaulhaber).
For errors in the documentation of a particular namespace, contact the author of that
namespace.
-->
  <body>
    <div id="AllContentContainer">
      <div id="Header">
<a id="Logo" href="index.html"><img alt="Clojure" height="100" width="100" src="../static/clojure-icon.gif" /></a>
<h1><a title="page header title" id="page-header" href="index.html">Clojure Core API Reference</a></h1>
      </div>
      <div id="leftcolumn"><div style="text-align: center;"></div>
<div class="menu">
  <div class="WikiCustomNav WikiElement wiki">
    <span class="toc-header"><span id="project-name">Clojure</span> <span id="version">v1.1</span> API</span><br />
    <ul>
      <li><a class="wiki_link" href="index.html">Overview</a></li>
      <li><a class="wiki_link" href="api-index.html">API Index</a></li>
    </ul>
    <div class="NamespaceTOC">
      <span class="toc-header">Namespaces</span>
      <ul id="left-sidebar-list">
        <li><a href="clojure.core-api.html" class="wiki_link">clojure.core</a></li><li><a href="clojure.inspector-api.html" class="wiki_link">clojure.inspector</a></li><li><a href="clojure.main-api.html" class="wiki_link">clojure.main</a></li><li><a href="clojure.set-api.html" class="wiki_link">clojure.set</a></li><li><a href="clojure.stacktrace-api.html" class="wiki_link">clojure.stacktrace</a></li><li><a href="clojure.template-api.html" class="wiki_link">clojure.template</a></li><li><a href="clojure.test-api.html" class="wiki_link">clojure.test</a></li><li><a href="clojure.walk-api.html" class="wiki_link">clojure.walk</a></li><li><a href="clojure.xml-api.html" class="wiki_link">clojure.xml</a></li><li><a href="clojure.zip-api.html" class="wiki_link">clojure.zip</a></li>
      </ul>
    </div>
    <div class="BranchTOC">
      <span class="toc-header">Other Versions</span>
      <ul id="left-sidebar-branch-list">
        <li><a href="../index.html" class="wiki_link">v1.6 (stable)</a></li><li><a href="../branch-master/index.html" class="wiki_link">v1.7 (in development)</a></li><li><a href="../branch-clojure-1.5.0/index.html" class="wiki_link">v1.5 (stable)</a></li><li><a href="../branch-clojure-1.4.0/index.html" class="wiki_link">v1.4 (legacy)</a></li><li><a href="../branch-1.3.x/index.html" class="wiki_link">v1.3 (legacy)</a></li><li><a href="../branch-1.2.x/index.html" class="wiki_link">v1.2 (legacy)</a></li>
      </ul>
    </div>
    <a href="http://clojure.org" class="wiki_link">Clojure Home</a>
  </div>
</div>
</div>
      <div id="rightcolumn">
<div id="Content">
<div class="contentBox"><div class="innerContentBox">
              <div id="content_view" class="wiki wikiPage">
                <div id="right-sidebar"><div id="toc">
  <h1 class="nopad">Table of Contents</h1>
  <div style="margin-left: 1em;" class="toc-section">
    <a href="#toc0" style="margin-top: 3px;">Overview</a>
    
  </div><div style="margin-left: 1em;" class="toc-section">
    <a href="#" style="margin-top: 3px;"></a>
    
  </div><div style="margin-left: 1em;" class="toc-section">
    <a href="#" style="margin-top: 3px;"></a>
    
  </div><div style="margin-left: 1em;" class="toc-section">
    <a href="#var-section" style="margin-top: 3px;">Vars and Functions</a>
    <div style="margin-left: 1em;" class="toc-entry">
      <a class="toc-entry-anchor" href="#clojure.set/difference">difference</a>
      
    </div><div style="margin-left: 1em;" class="toc-entry">
      <a class="toc-entry-anchor" href="#clojure.set/index">index</a>
      
    </div><div style="margin-left: 1em;" class="toc-entry">
      <a class="toc-entry-anchor" href="#clojure.set/intersection">intersection</a>
      
    </div><div style="margin-left: 1em;" class="toc-entry">
      <a class="toc-entry-anchor" href="#clojure.set/join">join</a>
      
    </div><div style="margin-left: 1em;" class="toc-entry">
      <a class="toc-entry-anchor" href="#clojure.set/map-invert">map-invert</a>
      
    </div><div style="margin-left: 1em;" class="toc-entry">
      <a class="toc-entry-anchor" href="#clojure.set/project">project</a>
      
    </div><div style="margin-left: 1em;" class="toc-entry">
      <a class="toc-entry-anchor" href="#clojure.set/rename">rename</a>
      
    </div><div style="margin-left: 1em;" class="toc-entry">
      <a class="toc-entry-anchor" href="#clojure.set/rename-keys">rename-keys</a>
      
    </div><div style="margin-left: 1em;" class="toc-entry">
      <a class="toc-entry-anchor" href="#clojure.set/select">select</a>
      
    </div><div style="margin-left: 1em;" class="toc-entry">
      <a class="toc-entry-anchor" href="#clojure.set/union">union</a>
      
    </div>
  </div>
</div>
</div>
                <div id="content-tag"><h1 id="overview">API for <span id="clojure.set">clojure.set</span>
  - <span id="header-project">Clojure</span> <span id="header-version">v1.1</span><span id="header-status-block"> (<span id="header-status">legacy</span>)</span>
  </h1>
<span id="author-line">by <span id="author-name">Rich Hickey</span><br /></span>
<br />Full namespace name: <span id="long-name">clojure.set</span>
<p></p>
<h2>Overview</h2>

<pre id="namespace-docstr">Set operations such as union/intersection.</pre>


<br />



<div id="var-section">
  <p></p>
  <h2>Public Variables and Functions</h2>
  <div id="var-entry">
    <br />
    <hr />
    <h2 id="clojure.set/difference">difference</h2>
    <span id="var-type">function</span><br />
    <pre id="var-usage">Usage: (difference s1)
       (difference s1 s2)
       (difference s1 s2 &amp; sets)
</pre>
    <pre id="var-docstr">Return a set that is the first set without elements of the remaining sets</pre>
    
    
    <a href="https://github.com/clojure/clojure/blob/76e7c4317dc3eac80c4908ac5e5fb885e302b2a4/src/clj/clojure/set.clj#L46" id="var-source">Source</a>
  </div><div id="var-entry">
    <br />
    <hr />
    <h2 id="clojure.set/index">index</h2>
    <span id="var-type">function</span><br />
    <pre id="var-usage">Usage: (index xrel ks)
</pre>
    <pre id="var-docstr">Returns a map of the distinct values of ks in the xrel mapped to a
set of the maps in xrel with the corresponding values of ks.</pre>
    
    
    <a href="https://github.com/clojure/clojure/blob/76e7c4317dc3eac80c4908ac5e5fb885e302b2a4/src/clj/clojure/set.clj#L87" id="var-source">Source</a>
  </div><div id="var-entry">
    <br />
    <hr />
    <h2 id="clojure.set/intersection">intersection</h2>
    <span id="var-type">function</span><br />
    <pre id="var-usage">Usage: (intersection s1)
       (intersection s1 s2)
       (intersection s1 s2 &amp; sets)
</pre>
    <pre id="var-docstr">Return a set that is the intersection of the input sets</pre>
    
    
    <a href="https://github.com/clojure/clojure/blob/76e7c4317dc3eac80c4908ac5e5fb885e302b2a4/src/clj/clojure/set.clj#L31" id="var-source">Source</a>
  </div><div id="var-entry">
    <br />
    <hr />
    <h2 id="clojure.set/join">join</h2>
    <span id="var-type">function</span><br />
    <pre id="var-usage">Usage: (join xrel yrel)
       (join xrel yrel km)
</pre>
    <pre id="var-docstr">When passed 2 rels, returns the rel corresponding to the natural
join. When passed an additional keymap, joins on the corresponding
keys.</pre>
    
    
    <a href="https://github.com/clojure/clojure/blob/76e7c4317dc3eac80c4908ac5e5fb885e302b2a4/src/clj/clojure/set.clj#L101" id="var-source">Source</a>
  </div><div id="var-entry">
    <br />
    <hr />
    <h2 id="clojure.set/map-invert">map-invert</h2>
    <span id="var-type">function</span><br />
    <pre id="var-usage">Usage: (map-invert m)
</pre>
    <pre id="var-docstr">Returns the map with the vals mapped to the keys.</pre>
    
    
    <a href="https://github.com/clojure/clojure/blob/76e7c4317dc3eac80c4908ac5e5fb885e302b2a4/src/clj/clojure/set.clj#L97" id="var-source">Source</a>
  </div><div id="var-entry">
    <br />
    <hr />
    <h2 id="clojure.set/project">project</h2>
    <span id="var-type">function</span><br />
    <pre id="var-usage">Usage: (project xrel ks)
</pre>
    <pre id="var-docstr">Returns a rel of the elements of xrel with only the keys in ks</pre>
    
    
    <a href="https://github.com/clojure/clojure/blob/76e7c4317dc3eac80c4908ac5e5fb885e302b2a4/src/clj/clojure/set.clj#L67" id="var-source">Source</a>
  </div><div id="var-entry">
    <br />
    <hr />
    <h2 id="clojure.set/rename">rename</h2>
    <span id="var-type">function</span><br />
    <pre id="var-usage">Usage: (rename xrel kmap)
</pre>
    <pre id="var-docstr">Returns a rel of the maps in xrel with the keys in kmap renamed to the vals in kmap</pre>
    
    
    <a href="https://github.com/clojure/clojure/blob/76e7c4317dc3eac80c4908ac5e5fb885e302b2a4/src/clj/clojure/set.clj#L82" id="var-source">Source</a>
  </div><div id="var-entry">
    <br />
    <hr />
    <h2 id="clojure.set/rename-keys">rename-keys</h2>
    <span id="var-type">function</span><br />
    <pre id="var-usage">Usage: (rename-keys map kmap)
</pre>
    <pre id="var-docstr">Returns the map with the keys in kmap renamed to the vals in kmap</pre>
    
    
    <a href="https://github.com/clojure/clojure/blob/76e7c4317dc3eac80c4908ac5e5fb885e302b2a4/src/clj/clojure/set.clj#L72" id="var-source">Source</a>
  </div><div id="var-entry">
    <br />
    <hr />
    <h2 id="clojure.set/select">select</h2>
    <span id="var-type">function</span><br />
    <pre id="var-usage">Usage: (select pred xset)
</pre>
    <pre id="var-docstr">Returns a set of the elements for which pred is true</pre>
    
    
    <a href="https://github.com/clojure/clojure/blob/76e7c4317dc3eac80c4908ac5e5fb885e302b2a4/src/clj/clojure/set.clj#L61" id="var-source">Source</a>
  </div><div id="var-entry">
    <br />
    <hr />
    <h2 id="clojure.set/union">union</h2>
    <span id="var-type">function</span><br />
    <pre id="var-usage">Usage: (union)
       (union s1)
       (union s1 s2)
       (union s1 s2 &amp; sets)
</pre>
    <pre id="var-docstr">Return a set that is the union of the input sets</pre>
    
    
    <a href="https://github.com/clojure/clojure/blob/76e7c4317dc3eac80c4908ac5e5fb885e302b2a4/src/clj/clojure/set.clj#L19" id="var-source">Source</a>
  </div>
</div>


</div>
              </div>
            </div>
          </div>
</div>
<div id="foot">
<div style="text-align: center;" id="copyright">Copyright 2007-2014 by Rich Hickey</div>
</div>
      </div>
      <div id="DesignedBy">Logo &amp; site design by <a title="Visit Tom Hickey's website." href="http://www.tomhickey.com">Tom Hickey</a>.<br />
      Clojure auto-documentation system by Tom Faulhaber.</div>
    </div>
    <!-- /AllContentContainer -->
  </body>

</html>
Something went wrong with that request. Please try again.